Beefy Boxes and Bandwidth Generously Provided by pair Networks
go ahead... be a heretic
 
PerlMonks  

Re: nested arrays

by the_slycer (Chaplain)
on Aug 14, 2002 at 18:58 UTC ( [id://190196]=note: print w/replies, xml ) Need Help??


in reply to nested arrays

Sounds like you want an HoA.
You can do this using array references:
my @array1 = ('1','2','3'); my @array2 = ('4','5','6'); my %hash = ( array1 => \@array1, array2 => \@array2 ); foreach (keys %hash) { foreach (@{$hash{$_}}) { print } }
That should give you the general idea. You can also see the manpage for perlref.

Log In?
Username:
Password:

What's my password?
Create A New User
Domain Nodelet?
Node Status?
node history
Node Type: note [id://190196]
help
Chatterbox?
and the web crawler heard nothing...

How do I use this?Last hourOther CB clients
Other Users?
Others exploiting the Monastery: (4)
As of 2024-04-25 21:27 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found