Beefy Boxes and Bandwidth Generously Provided by pair Networks
There's more than one way to do things
 
PerlMonks  

Re: Closure question

by fletcher_the_dog (Friar)
on Mar 02, 2004 at 18:05 UTC ( #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? | Other CB clients
Other Users?
Others exploiting the Monastery: (3)
As of 2021-09-28 15:02 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found

    Notices?