in reply to Re: Array of array
in thread Array of array

Thank you for ur help.The Data dumper returns $VAR1 value how assign it into normal array .Sorry for this type of question.I am new to perl

Replies are listed 'Best First'.
Re^3: Array of array
by AnomalousMonk (Archbishop) on May 05, 2011 at 17:41 UTC

    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