in reply to Re^2: Array of array
in thread Array of array
In the example below, the elements of the @kk array are already array references (i.e., scalar values). No need to dereference them to arrays and then copy them into anonymous array constructors to make them array references: just use them directly.
>perl -wMstrict -le "use Data::Dumper; ;; my @kk = ( [ qw(aa bb cc dd) ], [ qw(kk jj ll mm) ], ); ;; my $i = 1; my $arrayref = $kk[ $i ]; ;; print Dumper $arrayref; print @$arrayref; " $VAR1 = [ 'kk', 'jj', 'll', 'mm' ]; kkjjllmm
|
|---|