Beefy Boxes and Bandwidth Generously Provided by pair Networks
Clear questions and runnable code
get the best and fastest answer
 
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 perusing the Monastery: (12)
As of 2015-05-28 14:37 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    In my home, the TV remote control is ...









    Results (559 votes), past polls