We don't bite newbies here... much | |
PerlMonks |
More Scope related questions.by curiousmonk (Beadle) |
on Mar 29, 2013 at 04:22 UTC ( [id://1026077]=perlquestion: print w/replies, xml ) | Need Help?? |
curiousmonk has asked for the wisdom of the Perl Monks concerning the following question: In the examples below, the variable the declaration of $b without my, local or our works like a global variable. I know this issue will be solved if strictures and warnings are enabled(One would be forced to declare a scope specifier) but without that, the expected behaviour should be that unless you explicitly declare it as 'our' the scope of the variable should end immediately after the curly brace Shouldn't the default scope be local? case 1:
case 2:
case 3:
case 4:
Back to
Seekers of Perl Wisdom
|
|