Beefy Boxes and Bandwidth Generously Provided by pair Networks
good chemistry is complicated,
and a little bit messy -LW
 
PerlMonks  

Re: Scoping Rules For "our" Variables

by roboticus (Chancellor)
on Jun 26, 2011 at 14:31 UTC ( [id://911464]=note: print w/replies, xml ) Need Help??


in reply to Scoping Rules For "our" Variables

rehmanz:

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.

Replies are listed 'Best First'.
Re^2: Scoping Rules For "our" Variables
by rehmanz (Novice) on Jun 27, 2011 at 15:23 UTC
    Thank you! The use diagnostics command is extremely helpful.

Log In?
Username:
Password:

What's my password?
Create A New User
Domain Nodelet?
Node Status?
node history
Node Type: note [id://911464]
help
Chatterbox?
and the web crawler heard nothing...

How do I use this?Last hourOther CB clients
Other Users?
Others avoiding work at the Monastery: (5)
As of 2025-06-17 08:32 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found

    Notices?
    erzuuliAnonymous Monks are no longer allowed to use Super Search, due to an excessive use of this resource by robots.