in reply to Dereferencing an array of arrays

If you don't need the intermediate arrays (@array1, @array2 and @array3), you can save yourself some typing by constructing your array of arrays (or a ref. to an array of arrays) in one go.

# Array of arrays. # my @arrayOfArrays = ( [ qw(one two three four five) ], [ qw(blue green white orange black) ], [ qw(car bike plane ship) ], ); # Reference to array of arrays, # my $refToArrayOfArrays = [ [ qw(one two three four five) ], [ qw(blue green white orange black) ], [ qw(car bike plane ship) ], ];

I hope this is of use.

Cheers,

JohnGG