![]() |
|
Don't ask to ask, just ask | |
PerlMonks |
Re^2: hmm - - - something has changed in perl (from 5.34 to 5.36by Tux (Canon) |
on Nov 24, 2022 at 10:12 UTC ( #11148350=note: print w/replies, xml ) | Need Help?? |
100% agree with this! And Getopt::Long is extremely easy:
And if you want -B without any argument to default to say 42, all you have to change is
One step further: set a default, and also give a different default for -B without argument
In the first two examples $before will have the value undef when the option -B is not given at all. In the last example the default will be 2. Enjoy, Have FUN! H.Merijn
In Section
Seekers of Perl Wisdom
|
|