Re: "eval" and "my" variable weirdnessby tlm (Prior)
|on Jun 29, 2006 at 16:41 UTC||Need Help??|
Here's another example:
If one runs foo.pl, the output is
OK NOT OK...meaning that frobozz sees $x but quux doesn't. If one uncomments the commented line in quux or runs bar.pl directly, the output is
(This is true for both 5.8.6 and 5.8.8 on Linux.)
After re-reading the docs on eval, I can't see how a programmer can be expected to predict this behavior. Therefore, it is, at the very least, a design bug, IMO.
the lowliest monk