Earlier quoted context omitted.
> * Perl is set up for really terse one-liners. You can basically emulate or surpass most Unix tools with only a cursory knowledge of the syntax This definitely interests me. How does perl surpass Unix tools? I guess perl has the benefit of handling the equivalent of sed and awk.
Yeah, it has equivalents for each. Sed: perl -pe 's/foo/bar/' file1 Grep: perl -pe '/foo/' file1 uniq: perl -ne 'print unless $seen{$_}++' file1 But then you can combine conditions: perl -ne 's/foo/bar/ if /baz/ && /yot/; print "Line number $. changed to $_"' file1 And do some awk-ish line splitting: perl -F, -ane '$sum += $F[2]; END{ print "The sum of column 3 is $sum" }' file1 It absolutely flies in the face of the…
https://unix.stackexchange.com/a/79656
perl -e 'for(){((stat)[9]seems to be the fastest possible way to delete enormous amounts of files