use strict; use warnings; use Data::Dumper; use Getopt::Long; my @array; GetOptions ( "prueba2=s" => \@array, ) or die "not working: $!\n"; print Dumper(\@array); exit; __END__ foo.pl -p 1 -p 2 -p 3 $VAR1 = [ '1', '2', '3' ];
In reply to Re: parsing multiple values with getopt::long
by toolic
in thread parsing multiple values with getopt::long
by madM
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |