Beefy Boxes and Bandwidth Generously Provided by pair Networks
Come for the quick hacks, stay for the epiphanies.
 
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 imbibing at the Monastery: (4)
As of 2024-04-19 02:19 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found