in reply to parsing multiple values with getopt::long

As described in the documentation (Options with multiple values), you should use -prueba multiple times:
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' ];