Beefy Boxes and Bandwidth Generously Provided by pair Networks
P is for Practical
 
PerlMonks  

Re: 'my' with 'if 0' retains old value

by blazar (Canon)
on Apr 21, 2006 at 12:39 UTC ( [id://544871]=note: print w/replies, xml ) Need Help??


in reply to 'my' with 'if 0' retains old value

Yes, it is a well known behaviour not intended as a feature, that someone uses as if it were reliable semantic: although it is to be noted that even if it's not strictly a bug, such behaviour is not reliable and is left undefined by the specs (as of the docs). So it's better not to use it, period.

Logically, it doesn't make much sense at all to want have a declaration depending on a modifier: would you really like to have a lexical variable exist or not depending on a condition in the surrounding lexical scope?!?

Log In?
Username:
Password:

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

How do I use this?Last hourOther CB clients
Other Users?
Others sharing their wisdom with the Monastery: (4)
As of 2024-04-26 00:15 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found