Beefy Boxes and Bandwidth Generously Provided by pair Networks
XP is just a number

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


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.


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?

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

How do I use this?Last hourOther CB clients
Other Users?
Others drinking their drinks and smoking their pipes about the Monastery: (3)
As of 2024-06-16 05:54 GMT
Find Nodes?
    Voting Booth?

    No recent polls found

    erzuuli‥ 🛈The London Perl and Raku Workshop takes place on 26th Oct 2024. If your company depends on Perl, please consider sponsoring and/or attending.