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 ( [id://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?Last hourOther CB clients
Other Users?
Others studying the Monastery: (5)
As of 2025-01-22 08:54 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?
    Which URL do you most often use to access this site?












    Results (63 votes). Check out past polls.