4 ms·
There’s already a language that provides all the features of awk plus modern language conveniences, and is available on every system you can think of. It’s Perl
by jph00 11mo ago
There’s already a language that provides all the features of awk plus modern language conveniences, and is available on every system you can think of. It’s Perl.
It even comes with an auto translator for converting awk to Perl: https://perldoc.perl.org/5.8.4/a2p https://perldoc.perl.org/5.8.4/a2p
It also provides all the features of sed.
The command line flags to learn about to get all these features are: -p -i -n -l -a -e
- groby_b 11mo agoYes, but it's not in any way relevant to the topic of the article except both mentioning awk. The author specifically wanted a functional variant of awk, and they wrote the article because it meant updating their priors on LLMs. Both are interesting topics. I'd love to hear a Perl perspective on either
- AdieuToLogic 11mo ago> The author specifically wanted a functional variant of awk ... I'd love to hear a Perl perspective I believe Functional programming in Perl[0] may answer some of the questions related to using FP concepts with Perl. 0 - http://functional-perl.org/ http://functional-perl.org/
- AdieuToLogic 11mo ago> The command line flags to learn about to get all these features are: -p -i -n -l -a -e One of my favorite Perl mnemonics when needing to apply edits to a set of files is: With Perl, it is as easy as pie. Which reminds me that making a global substitution across N files can be done with: perl -p -i -e '<insert substitution here>' $WHAT_FILES