|
|
| Pathologically Eclectic Rubbish Lister | |
| PerlMonks |
Re: Is use strict always appropriate?by tobyink (Prior) |
| on Jun 19, 2012 at 05:49 UTC ( #976965=note: print w/ replies, xml ) | Need Help?? |
|
With very short scripts (less than 6 lines, say), it probably confers no benefits. For anything longer, use strict qw(subs vars) seems to always be appropriate. use strict qw(refs) is usually appropriate, but it's sometimes useful to allow non-strict refs.
perl -E'sub Monkey::do{say$_,for@_,do{($monkey=[caller(0)]->[3])=~s{::}{ }and$monkey}}"Monkey say"->Monkey::do'
In Section
Seekers of Perl Wisdom
|
|
||||||||||||||||||||