No such thing as a small change | |
PerlMonks |
Re: Re^4: = rather than =~ ? (too brief?)by BrowserUk (Patriarch) |
on Jan 02, 2004 at 20:31 UTC ( [id://318409]=note: print w/replies, xml ) | Need Help?? |
I think I understand what you/they mean, but the empirical evidence says different.
In both examples, $foo in the print statement has never been assigned a value. In the first example, the compiler has seen the declaration and so only it's definedness is a problem and we get the "Use of uninitialized value" warning. In the second case, it is not only undefined, it doesn't exists and so we get the "Global symbol "$foo" requires explicit package name" error. It clearly indicates that although the if condition is false and the assignment is never performed, the my declaration has been see and acted upon. This is true with 5.6.1 and 5.8.1. Maybe the documentation is out of date?
In Section
Seekers of Perl Wisdom
|
|