in reply to array empty when calling script with getopt::long
Usually, the programmer includes a "-h" option for displaying the synopsis, or simply lets Getopt::Long throw an error when "-h" or "-?" is used as an option, and makes sure to display the synopsis whenever Getopt::Long throws an error.
What would the synopsis be for your script? Why would you need a subroutine to process your options? What do "$substr1" and "$substr2" contain (where is the code that assigns values to those variables)?
|
|---|