Beefy Boxes and Bandwidth Generously Provided by pair Networks
Think about Loose Coupling
 
PerlMonks  

Lexical closures

by spurperl (Priest)
on Oct 25, 2008 at 07:34 UTC ( #719475=perlquestion: print w/replies, xml ) Need Help??

Help for this page

Select Code to Download


  1. or download this
    my @flist = ();
    
    ...
    {
        print $f->(2), "\n";
    }
    
  2. or download this
    flist = []
    
    ...
    
    for f in flist:
        print f(2)
    

Log In?
Username:
Password:

What's my password?
Create A New User
Node Status?
node history
Node Type: perlquestion [id://719475]
Approved by GrandFather
Front-paged by Erez
help
Chatterbox?
and the web crawler heard nothing...

How do I use this? | Other CB clients
Other Users?
Others lurking in the Monastery: (7)
As of 2019-07-15 18:52 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found

    Notices?