more useful options | |
PerlMonks |
comment on |
( [id://3333]=superdoc: print w/replies, xml ) | Need Help?? |
Any dangers to putting "my" on every variable? It's not always going to work. Here's a (contrived) example: Results are: $x is 3Now look at: Results are: $x is Reason: the my makes $x a "lexical" varible which is "in scope" only within the innermost { } pair. Ouside of there, it has no meaning, or other, unrelated meaning. So you'll at least have to dig out all the globals and do the my at the filde scope level (eg outside of any { } blocks). They'll still be globals, but it lets you start using strict. --Bob Niederman, http://bob-n.comAll code given here is UNTESTED unless otherwise stated. In reply to Re: Sub-initiate needs help getting started
by bobn
|
|