in reply to Getting selected options from GetOptions()
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";
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re^2: Getting selected options from GetOptions()
by Anonymous Monk on Dec 16, 2009 at 20:44 UTC | |
by zwon (Abbot) on Dec 16, 2009 at 20:54 UTC | |
by Anonymous Monk on Dec 16, 2009 at 20:47 UTC |