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…