Beefy Boxes and Bandwidth Generously Provided by pair Networks
Keep It Simple, Stupid
 
PerlMonks  

Re: nested arrays

by the_slycer (Chaplain)
on Aug 14, 2002 at 18:58 UTC ( #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
Node Status?
node history
Node Type: note [id://190196]
help
Chatterbox?
and the web crawler heard nothing...

How do I use this? | Other CB clients
Other Users?
Others contemplating the Monastery: (7)
As of 2020-05-30 16:17 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?
    If programming languages were movie genres, Perl would be:















    Results (173 votes). Check out past polls.

    Notices?