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

Re: recursive anonymous subroutines

by snoopy (Deacon)
on Apr 07, 2006 at 01:30 UTC ( #541775=note: print w/replies, xml ) Need Help??

Help for this page

Select Code to Download


  1. or download this
    #!/usr/bin/perl
    
    ...
    };
    
    print "factorial of 7 is ".&$sub(7)."\n";
    
  2. or download this
    my @factorials = map {&{
        my $this_sub;
    ...
        }}($_)} (3,5,7,9);
    
    print "factorials: @factorials\n";
    

Log In?
Username:
Password:

What's my password?
Create A New User
Node Status?
node history
Node Type: note [id://541775]
help
Chatterbox?
and the web crawler heard nothing...

How do I use this? | Other CB clients
Other Users?
Others cooling their heels in the Monastery: (5)
As of 2016-09-30 23:17 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?
    Extraterrestrials haven't visited the Earth yet because:







    Results (574 votes). Check out past polls.