Beefy Boxes and Bandwidth Generously Provided by pair Networks
laziness, impatience, and hubris
 
PerlMonks  

Re: looping over multidimensional arrays

by Laurent_R (Canon)
on Sep 20, 2018 at 21:24 UTC ( [id://1222753]=note: print w/replies, xml ) Need Help??


in reply to looping over multidimensional arrays

See also the answers to this post for additional solutions and information: Joining array into new string

This is an example with map, shown here at the command line:

$ perl -we 'use strict; > use Data::Dumper; > my @AoA = ( ["a" .. "d"], ["e" .. "h"]); > print Dumper \@AoA; > print "\n", map { "@$_ "} @AoA;' $VAR1 = [ [ 'a', 'b', 'c', 'd' ], [ 'e', 'f', 'g', 'h' ] ]; a b c d e f g h

Log In?
Username:
Password:

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

How do I use this?Last hourOther CB clients
Other Users?
Others wandering the Monastery: (3)
As of 2024-03-29 02:28 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found