http://www.perlmonks.org?node_id=184515


in reply to How can I stop ARGV from globbing all over the place?

Don'y blame perl and @ARGV -- blame your shell. It's the shell which is doing the expansion on the globm before it ever hits perl.

The method you've described, of assuming it's one mode until told otherwise, isn't wrong at all; in fact, it's rather canonical.

perl -pe '"I lo*`+$^X$\"$]!$/"=~m%(.*)%s;$_=$1;y^`+*^e v^#$&V"+@( NO CARRIER'