![]() |
|
good chemistry is complicated, and a little bit messy -LW |
|
PerlMonks |
Re: Scoping Rules For "our" Variablesby roboticus (Chancellor) |
on Jun 26, 2011 at 14:31 UTC ( [id://911464]=note: print w/replies, xml ) | Need Help?? |
I must admit that I'm somewhat perplexed by your question: You provide some code and then ask what it should produce by itself and with use strict. If you try running it, perl will show you what it *should* produce. (Unless you've found a bug in perl--but that's not going to be likely!) Your question about use strict shows that you're headed in the right direction, but if you try it with use warnings then perl will tell you why you're not getting the results you expect. In addition to the packages ones wind mentioned, you may find use diagnostics useful, too. It adds some information to the error messages that describe frequent causes of the errors and/or warnings. When I started learning perl, I used it frequently. ...roboticus When your only tool is a hammer, all problems look like your thumb. Update: I tweaked the first paragraph a tiny bit to make it flow better.
In Section
Seekers of Perl Wisdom
|
|