Beefy Boxes and Bandwidth Generously Provided by pair Networks
Your skill will accomplish
what the force of many cannot
 
PerlMonks  

Re: How do i create array of arrays

by robsv (Curate)
on Jan 17, 2001 at 00:18 UTC ( [id://52334]=note: print w/replies, xml ) Need Help??


in reply to How do i create array of arrays

# Create the arrays my $a = [qw(one two three four)]; my $b = [qw(red green blue)]; # Create the array of arrays my $aoa = [$a,$b]; # Print each element foreach $i (0..$#{$aoa}) { foreach $j (0..$#{$aoa->[$i]}) { print $aoa->[$i][$j] . "\n"; } }

Log In?
Username:
Password:

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

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

    No recent polls found