http://qs321.pair.com?node_id=11107132


in reply to How to store arrays in another array

... or even more succinctly ...
my @rows = ( [ qw(71 22 15 10 51) ], [ qw(91 82 28 11 91) ], [ qw(11 72 37 58 20) ], [ qw(21 42 63 24 16) ], [ qw(81 32 53 54 42) ], );
or, if you really need to identify each array separately ...
my @row1 = qw(71 22 15 10 51); my @row2 = qw(91 82 28 11 91); my @row3 = qw(11 72 37 58 20); my @row4 = qw(21 42 63 24 16); my @row5 = qw(81 32 53 54 42); my @rows = ( \@row1, \@row2, \@row3, \@row4, \@row5 );
A user level that continues to overstate my experience :-))

Replies are listed 'Best First'.
Re^2: How to store arrays in another array
by AnomalousMonk (Archbishop) on Oct 07, 2019 at 19:55 UTC

    my @rows = ( \@row1, \@row2, \@row3, \@row4, \@row5 );
    That's what
        my @rows = \(@row1, @row2, @row3, @row4, @row5);
    does.


    Give a man a fish:  <%-{-{-{-<

      Hmm, never knew that; TFT - just goes to show that my sig isn't in the least inaccurate

      A user level that continues to overstate my experience :-))