3 ms·
> Its happy place was a sane job control language maybe that was your happy place for Perl, but it certainly wasn't mine or that of lot of Perl users I've know
by PaulDavisThe1st 4y ago
> Its happy place was a sane job control language
maybe that was your happy place for Perl, but it certainly wasn't mine or that of lot of Perl users I've known over the years.
#!/bin/perlish
while (<>) {
/* regex match */
/* do some stuff, with variables or the file system or whatever */
}
Awk theoretically is a close match for this basic structure, but Perl is closer, most of the time.
- worik 4y agoYes. I mispoke. "A happy place" I shold have said I never learnt awk or sed bedcause I knew Perl. That loop, often in a command line invocation `perl -e 'while(<>){chomp;......}'` My point is its happy place was not application programming, gui systems. AS I commented elsewhere here processing every Apache hook. Pythin suffers the same problem. It too is brilliant at the little jobs, yet there are many GUI junk piles written in it, just as happened with Perl back in the day
- wazoox 4y agoPerl offer auto looping : perl -n or perl -p. Typically one-liners are `perl -n -e 's/foo/bar/g'` or similar.