you are setting the value of %opt{z} == "" which is false.
Actually I disagree. The documentation says quite clearly that this behaviour is incorrect:
The getopt() functions processes single-character switches with switch clustering. Pass one argument which is a string containing all switches that take an argument. For each switch found, sets $opt_x (where x is the switch name) to the value of the argument, or 1 if no argument. Switches which take an argument don't care whether there is a space between the switch and the argument.
Although I do agree with you that probably he should be using getopts and not getopt, but even better would be to just ditch Getopt::Std and use Getopt::Long instead.
First they ignore you, then they laugh at you, then they fight you, then you win.
-- Gandhi
In reply to Re: Re: Passing switches through pl2bat scripts
by demerphq
in thread Passing switches through pl2bat scripts
by PhilHibbs
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |