Beefy Boxes and Bandwidth Generously Provided by pair Networks
Welcome to the Monastery
 
PerlMonks  

Re: looping over multidimensional arrays

by Laurent_R (Canon)
on Sep 20, 2018 at 21:24 UTC ( #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
Node Status?
node history
Node Type: note [id://1222753]
help
Chatterbox?
and the web crawler heard nothing...

How do I use this? | Other CB clients
Other Users?
Others about the Monastery: (3)
As of 2019-07-18 02:20 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found

    Notices?