in reply to Value into array

Sounds like what you need here is a 2-dimensional array, what Perl calls an Array of Array's.
@input_array = ( \@row1, \@row2, \@row3);
I couldn't find a link for you that I could post here that is both informative and also that I was sure was "public domain".
Try google on "Perl array of arrays".
Some code:
Note that in Perl array indices start at  [0] not [1].
#!/usr/bin/perl; use strict; use warnings; my @input_array = ( ["x","y"], ["L","M"], [2,45] ); foreach my $row (@input_array) { print "@$row\n"; } print "\nanother way\n"; for (my $row=0; $row<@input_array; $row++) { for (my $column=0; $column <@{$input_array[$row]}; $column++) { print "$input_array[$row][$column] "; } print "\n"; } print "\nyet, another way\n"; for (my $row=0; $row<3; $row++) { for (my $col =0; $col<2; $col++) { print "[$row][$col]=$input_array[$row][$col] " } print "\n"; } __END__ x y L M 2 45 another way x y L M 2 45 yet, another way [0][0]=x [0][1]=y [1][0]=L [1][1]=M [2][0]=2 [2][1]=45