in reply to Re: Passing switches through pl2bat scripts
in thread Passing switches through pl2bat scripts
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
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re:^3 Passing switches through pl2bat scripts
by flounder99 (Friar) on Nov 17, 2003 at 17:17 UTC | |
by demerphq (Chancellor) on Nov 17, 2003 at 18:02 UTC |