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

tmharish's scratchpad

by tmharish (Friar)
on Jul 11, 2009 at 12:12 UTC ( #779186=scratchpad: print w/ replies, xml ) Need Help??

Nested map

use strict ; use warnings ; use Data::Dump ; my @blah = ( 1 .. 5 ) ; my @arr_of_arr = ( \@blah, \@blah ) ; my @blahblah = map &map_sub, @arr_of_arr ; dd( \@blahblah ) ; sub map_sub { my $param = $_ ; if( ( ref $param ) eq 'ARRAY' ) { my @tmp = map &map_sub, @{ $param } ; return \@tmp ; } return $param + 1 ; }
Log In?
Username:
Password:

What's my password?
Create A New User
Chatterbox?
and the web crawler heard nothing...

How do I use this? | Other CB clients
Other Users?
Others examining the Monastery: (9)
As of 2014-12-25 10:54 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    Is guessing a good strategy for surviving in the IT business?





    Results (160 votes), past polls