more useful options | |
PerlMonks |
Re^4: if(my) scopeby citromatik (Curate) |
on Apr 16, 2009 at 11:13 UTC ( [id://757939]=note: print w/replies, xml ) | Need Help?? |
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
In Section
Seekers of Perl Wisdom
|
|