I have known about perl invocation options for a while, and I have used them on several occasions. However, I’m not sure I understood just how far the rabbit hole goes.

Try the following: [sourcecode language=”perl”] perl -wnle ‘print “Each line of the file is printed here $_”;’ foo #Process through each line. perl -wpie ‘s/replace/with/g;’ foo # sed -i replacement perl -wnlae ‘print $F[0]’ foo # awk ‘{print $1}’ replacement [/sourcecode]

The best part is that these go beyond just replacing existing shell commands because of all the powerful constructs that exist in perl. If you are interested in more of the same, check out the linked book. Now if you will excuse me I am going to go follow the white rabbit…

http://www.amazon.com/Minimal-Perl-UNIX-Linux-People/dp/1932394508/ref=sr_1_1?ie=UTF8&qid=1329999439&sr=8-1