in reply to parsing multiple values with getopt::long

Change your "print" statement to :
print "@array\nExtra params: @ARGV";
and you will see the problem.

The correct way to pass in multiple values is:

perl <program> --prueba2 1 -prueba2 2 --prueba2 3
You could get the results you are trying without repeating the parameter name, if you use the "experimental" "repeat specifier" getopt feature:
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