in reply to parsing multiple values with getopt::long
and you will see the problem.print "@array\nExtra params: @ARGV";
The correct way to pass in multiple values is:
You could get the results you are trying without repeating the parameter name, if you use the "experimental" "repeat specifier" getopt feature:perl <program> --prueba2 1 -prueba2 2 --prueba2 3
GetOptions ( "prueba2=i{3}" => \@array, ) or die "not working: $!\n";
What is the sound of Perl? Is it not the sound of a wall that people have stopped banging their heads against?
-Larry Wall, 1992
|
|---|