in reply to Passing negative numbers on the command line with Getopt::Long

Here's another way to do it that does not require changing the option prefix. From the help for Getopt::long

"To stop Getopt::Long from processing further arguments, insert a double dash -- on the command line"

So you can remove that "Getopt::Long::Configure" line from add.pl and call it thusly:
C:\>add --offset 6 -- -5 result = 1 C:\>
  • Comment on Re: Passing negative numbers on the command line with Getopt::Long
  • Download Code