You should probably be specifying destination variables for your options. Otherwise, you will need to predeclare your $opt_x variables with our or use vars. The man page for Getopt::Long is clear on this point:
Default destinations
When no destination is specified for an option, GetOptions will store the resultant value in a global variable named "opt_"XXX, where XXX is the primary name of this option. When a progam executes under "use strict" (recommended), these variables must be pre-declared with our() or "use vars".
It is always a good idea to read the documentation for the modules you choose to use.
-sauoq "My two cents aren't worth a dime.";
In reply to Re: Error when using strict pragma
by sauoq
in thread Error when using strict pragma
by Sara
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |