Is there a way to get Perl to avoid handling negative values as command line switches? It seems that neither the string nor the inverse of the argument helps on Linux:
$ perl -e 'print "@ARGV\n";' 4 5
4 5
$ perl -e 'print "@ARGV\n";' -4 5
Unrecognized switch: -4 (-h will show valid options).
$ perl -e 'print "@ARGV\n";' "-4" 5
Unrecognized switch: -4 (-h will show valid options).
$ perl -e 'print "@ARGV\n";' '-4' 5
Unrecognized switch: -4 (-h will show valid options).
$ perl -e 'print "@ARGV\n";' \-4 5
Unrecognized switch: -4 (-h will show valid options).
source
share