Getopt::Long's documentation does document it, though not directly (emphasis added):
The call to GetOptions() parses the command line arguments that are present in "@ARGV" and sets the option variable to the value "1" if the option did occur on the command line. Otherwise, the option variable is not touched.It's just a little leap from that that you can take advantage of having an option's variable set before its passed to GetOptions, which is what the odd code given does.
In reply to Re: Re: "Getoptions'" argument syntax
by wog
in thread "Getoptions'" argument syntax
by nysus
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |