Beefy Boxes and Bandwidth Generously Provided by pair Networks
Your skill will accomplish
what the force of many cannot
 
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
Domain Nodelet?
Chatterbox?
and the web crawler heard nothing...

How do I use this? | Other CB clients
Other Users?
Others pondering the Monastery: (2)
As of 2023-10-03 17:33 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found

    Notices?