in reply to parsing multiple values with getopt::long
You can also use a repeat specifier:
GetOptions ( "prueba2=s{1,}" => \@array, ) or die "not working: $!\n";
s{1,} means at least one. So you just need to type -p 1 2 3 instead of -p 1 -p 2 -p 3 - if like to save some energy ;-)
Regards, Karl
«The Crux of the Biscuit is the Apostrophe»
|
|---|