in reply to Multidimensional Arrays
what am i doing wrong ?my @row0 = (1, 0, 0); my @row1 = (0, 1, 0); my @row2 = (0, 0, 1); my @arr = ( \@row0, \@row1, \@row2 ); for ( $i = 0; $i < 3; $i++ ) { for ( $j = 0; $j < 3; $j++ ) { print "arr[$i][$j] = $arr[$i][$j]\n"; } } # works perfectly print "*" x 80, "\n"; my @another = \$arr[1]; for ( $i = 0; $i < 3; $i++ ) { print "another[$i] = $another->[$i]\n"; } # while this loop prints blanks
|
---|
Replies are listed 'Best First'. | |
---|---|
Re^2: Multidimensional Arrays
by chb (Deacon) on Nov 25, 2004 at 10:02 UTC | |
Re^2: Multidimensional Arrays
by wfsp (Abbot) on Nov 25, 2004 at 10:12 UTC | |
by chb (Deacon) on Nov 25, 2004 at 10:54 UTC | |
by wfsp (Abbot) on Nov 25, 2004 at 11:22 UTC |
In Section
Tutorials