Welcome to the Monastery | |
PerlMonks |
How scoping works in If statements?by prasadbabu (Prior) |
on May 30, 2008 at 06:23 UTC ( [id://689142]=perlquestion: print w/replies, xml ) | Need Help?? |
prasadbabu has asked for the wisdom of the Perl Monks concerning the following question:
Hi Monks,
I know the variable declared with my inside a block will have scoping till the block ends, which works fine in case 1, but not in case 2. If so, then how the document says both are equal and the difference is Perlish way. Is both statements are equal or different? Could someone enlighten me? Thanks in advance Prasad
Back to
Seekers of Perl Wisdom
|
|