in reply to Passing negative numbers on the command line with Getopt::Long
Interesting, but it appears you are abusing the expectations of an experienced command-line user. As a matter of fact you're not even processing the integer in question with Getopt.
2 more traditional solutions come to mind:
Use the options terminator:
$ add.pl -- -5 $ add.pl -offset -2 -- 12
or use the "pass_through" option for configuration instead.
$ add.pl -5 $add.pl -offset -2 -5
Since you're shifting $value off of the command line anyway this really seems the best way.
|
|---|