in reply to Re^3: if(my) scope
in thread if(my) scope
IMO the $h is visible entirely to the outer {} rather than 'if' block
No, it is not, a variable "lives" in the most inner block of code where it has been declared. If it is declared in an "if" condition or in a loop initialization, it is accessible only inside the "if" or loop block.
citromatik
|
---|
Replies are listed 'Best First'. | |
---|---|
Re^5: if(my) scope
by citromatik (Curate) on Apr 16, 2009 at 11:35 UTC | |
by ikegami (Patriarch) on Apr 16, 2009 at 13:54 UTC | |
Re^5: if(my) scope
by dave_the_m (Monsignor) on Apr 16, 2009 at 11:23 UTC | |
by oha (Friar) on Apr 16, 2009 at 13:00 UTC |
In Section
Seekers of Perl Wisdom