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

Re: Variable declaration

by Ovid (Cardinal)
on Oct 17, 2011 at 15:14 UTC ( #931947=note: print w/ replies, xml ) Need Help??


in reply to Variable declaration

In addition to the other comments, I recommend new programmers also use diagnostics. Not only does that give you more information about the error, it also gives you suggestions on how to fix it. Here's the output I get when I include that:

Global symbol "$another_variable" requires explicit package name at di +ag.pl line 6. Execution of diag.pl aborted due to compilation errors (#1) (F) You've said "use strict" or "use strict vars", which indicates + that all variables must either be lexically scoped (using "my" or +"state"), declared beforehand using "our", or explicitly qualified to say which package the global variable is in (using "::"). Uncaught exception from user code: Global symbol "$another_variable" requires explicit package na +me at diag.pl line 6. Execution of diag.pl aborted due to compilation errors. at diag.pl line 6


Comment on Re: Variable declaration
Download Code

Log In?
Username:
Password:

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

How do I use this? | Other CB clients
Other Users?
Others drinking their drinks and smoking their pipes about the Monastery: (13)
As of 2014-04-16 23:21 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    April first is:







    Results (436 votes), past polls