3 ms·
Many years ago I used the Perl version of Expect (https://metacpan.org/pod/Expect https://metacpan.org/pod/Expect) to automate several workflows that wanted man
by thesuperbigfrog 2y ago
Many years ago I used the Perl version of Expect (https://metacpan.org/pod/Expect https://metacpan.org/pod/Expect) to automate several workflows that wanted manual inputs.
I thought that it was far better than the TCL Expect because I could also use other CPAN modules and have Perl's regular expressions to parse the system's output.
Expect is a great tool to have in your toolkit.
- creer 2y ago> Perl version of Expect (https://metacpan.org/pod/Expect https://metacpan.org/pod/Expect) Still a great answer and latest update in March this year.
- overanalytcl 2y agoArguably, Tcl can do GUIs much easily and can integrate C less awkwardly than Perl. Both have their use cases, at any rate, and more people should use Tcl, Perl and any version of Expect. Nowadays it falls into the category of tools that were once somewhat used, but now are obscure, like fold/fmt, nl, comm and pr.
- thesuperbigfrog 2y ago>> Arguably, Tcl can do GUIs much easily and can integrate C less awkwardly than Perl. We used Perl/Tk for GUIs on that old system. It brimgs the ease of Tk GUIs to Perl: https://metacpan.org/dist/Tk/view/pod/UserGuide.pod https://metacpan.org/dist/Tk/view/pod/UserGuide.pod >> Nowadays it falls into the category of tools that were once somewhat used, but now are obscure To be sure, but a lot of it still works without changes!
- kevin_thibedeau 2y agoPerl/Tk has always been a red headed stepchild since it is a fork attempting to implement a C API that doesn't require Tcl to be linked. Because of that, it has long missed out on significant improvements to Tk over the years. Python Tkinter avoids that by just wrapping around a Tcl interpreter.
- bch 2y ago> Perl's regular expressions to parse […] To be fair, Tcl has Henry Spencer’s regexp[0][1], and is awesome; Postgres also base their regex on Henry’s work for Tcl[2]. Perl is certainly famous for its regex and popularizing thinking of problems in terms of regexes (for better or for worse[3]), but it’s not the only game in town. [0] https://en.wikipedia.org/wiki/Henry_Spencer https://en.wikipedia.org/wiki/Henry_Spencer [1] https://wiki.tcl-lang.org/page/Regular+Expressions https://wiki.tcl-lang.org/page/Regular+Expressions [2] https://github.com/postgres/postgres/blob/master/src/backend/regex/COPYRIGHT https://github.com/postgres/postgres/blob/master/src/backend... [3] https://stackoverflow.com/questions/1732348/regex-match-open-tags-except-xhtml-self-contained-tags#1732454 https://stackoverflow.com/questions/1732348/regex-match-open...
- thesuperbigfrog 2y ago>> Perl is certainly famous for its regex and popularizing thinking of problems in terms of regexes (for better or for worse), but it’s not the only game in town. Agreed. In that old system we did not have any TCL scripts or third-party libraries--just C, Perl, and C shell (no Bash; it was Unix). C shell scripting is painful (https://www.grymoire.com/Unix/Csh.html https://www.grymoire.com/Unix/Csh.html), so practically all scripting was Perl or occasionally AWK.