Beefy Boxes and Bandwidth Generously Provided by pair Networks
Your skill will accomplish
what the force of many cannot
 
PerlMonks  

Re^8: RFC: Tutorial: use strict; now what!?

by educated_foo (Vicar)
on Feb 09, 2012 at 17:53 UTC ( [id://952798]=note: print w/replies, xml ) Need Help??


in reply to Re^7: RFC: Tutorial: use strict; now what!?
in thread RFC: Tutorial: use strict; now what!?

That's your problem: my makes a variable lexical, and symbolic references only work with dynamic/global variables. BTW, this is also why mixing eval STRING with lexicals is problematic:
foobar:perl/blead% perl -le '$y="print \$x"; $z=sub { my $x=23; $y}; e +val $z->()' foobar:perl/blead% perl -le '$y="print \$x"; $z=sub { $x=23; $y}; eval + $z->()' 23

Log In?
Username:
Password:

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

How do I use this?Last hourOther CB clients
Other Users?
Others about the Monastery: (6)
As of 2024-04-23 12:07 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found