Beefy Boxes and Bandwidth Generously Provided by pair Networks
Welcome to the Monastery
 
PerlMonks  

Re: Closure question

by fletcher_the_dog (Friar)
on Mar 02, 2004 at 18:05 UTC ( [id://333321]=note: print w/replies, xml ) Need Help??


in reply to Closure question

I have run into this problem before and it has to do with the fact that the statement "my @r=..." hasn't been executed yet. Perl lets you use the @r under strict because your definition for "doesnt_work" is within the lexical scope of @r. But it does not automatically execute code just because it uses a variable that might possible be in a closure or just because it is in a block that contains a definition of a sub.

Log In?
Username:
Password:

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

How do I use this?Last hourOther CB clients
Other Users?
Others meditating upon the Monastery: (5)
As of 2024-04-20 14:44 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found