I am trying to find a link to Perl GetOptions that explains this behavior.
If I call GetOptions twice, then the second time I call it, it cannot parse the command line options, and they all return undefined. Was there a first call to GetOptions (which, by the way, failed and returned 0), used command-line options, or did the second call just decide not to disturb the parsing, because he remembered that he had previously failed?
Do not ask why I call GetOptions twice - this is because the code will be difficult to restructure, and I would prefer not to do this if necessary. I just want an easy way, before the “real” call to GetOptions, to check for a single command line parameter. Thank.
source
share