I've tweaked one line though:
$opthash{$lastopt}=[] unless ref $opthash{$lastopt};
So that it can handle both types of lists:
script.pl --list aa --list bb and script.pl --list aa bb
cheers
In reply to Re^2: generic getopt to hash
by Anonymous Monk
in thread generic getopt to hash
by Anonymous Monk
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |