in reply to Re^4: A curious case of of my() (What is GLOBAL?)
in thread A curious case of of my()
... special vars like $_ which always belong to main:: without full qualification
...unless $_ is lexicalized in the current scope :)
$_=666; { my $_=777; print $_; # -> 777 print $main::_; # -> 666 }
(just meaning to say that $_ isn't the best example — otherwise I agree of course)
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re^6: A curious case of of my() (What is GLOBAL?)
by LanX (Saint) on Apr 05, 2011 at 12:52 UTC | |
by JavaFan (Canon) on Apr 05, 2011 at 13:46 UTC | |
by LanX (Saint) on Apr 05, 2011 at 14:09 UTC | |
by ikegami (Patriarch) on Apr 05, 2011 at 18:23 UTC |