in reply to Anonymous Reference???
An array can ONLY contain scalar elements. A reference to an array IS a scalar, so that's how you get arrays of arrays.
You then can fetch $aoa[1][1] and get 5.my @a = ( 1, 2, 3 ); # make an array my $ra = \@a; # make a reference to @a my $rb = [ 4, 5, 6 ]; # make a reference to an anonymous arra +y my @aoa = ( $ra, $rb ); # make an array of arrays
perldoc: perllol, perlreftut, perlref, etc. Also try Data::Dumper for ideas on how to visualize structures in Perl syntax.
--
[ e d @ h a l l e y . c c ]
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re^2: Anonymous Reference???
by pg (Canon) on Sep 12, 2005 at 04:03 UTC | |
by chromatic (Archbishop) on Sep 12, 2005 at 04:24 UTC | |
by sk (Curate) on Sep 12, 2005 at 04:38 UTC | |
by halley (Prior) on Sep 12, 2005 at 12:31 UTC |