Beefy Boxes and Bandwidth Generously Provided by pair Networks
Do you know where your variables are?
 
PerlMonks  

Re: Flatten sparse AoA

by jwkrahn (Abbot)
on Jan 22, 2012 at 22:15 UTC ( [id://949289]=note: print w/replies, xml ) Need Help??


in reply to Flatten sparse AoA

is there a more efficient way to eliminate all the undefs right there inside the map()
my @flat = map defined ? @$_ : (), @$aoa;

Or perhaps:

my @flat = map ref eq 'ARRAY' ? @$_ : (), @$aoa;

Log In?
Username:
Password:

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

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

    No recent polls found