Beefy Boxes and Bandwidth Generously Provided by pair Networks
Think about Loose Coupling
 
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 surveying the Monastery: (12)
As of 2014-08-27 19:29 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    The best computer themed movie is:











    Results (250 votes), past polls