If you want something more robust, I suggest a hash, e.g. (not tested):if ($a) { print "a was selected\n"; }
my %opts; GetOptions(map { ($_ => \$opts{$_}) } "a".."z"); $opts{$_} and print "$_ was selected\n" for "a".."z";
In reply to Re: Getting selected options from GetOptions()
by runrig
in thread Getting selected options from GetOptions()
by Anonymous Monk
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |