in reply to Processing ARGV

I'd appreciate any perls of wisdom you may have for me.

If you really want to get the goods from Perl, I encourage you to learn the language's idioms.

if ($#ARGV != 0) { foreach( @ARGV )
could be summed as  while (@ARGV) and  print $_ can be written print;.
Perl DWYM in running all those checks for you.

Software speaks in tongues of man; I debug, therefore I code.