Beefy Boxes and Bandwidth Generously Provided by pair Networks
Think about Loose Coupling

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 line 6. Execution of 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 line 6. Execution of aborted due to compilation errors. at line 6

Comment on Re: Variable declaration
Download Code

Log In?

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

How do I use this? | Other CB clients
Other Users?
Others making s'mores by the fire in the courtyard of the Monastery: (11)
As of 2015-10-13 08:34 GMT
Find Nodes?
    Voting Booth?

    Does Humor Belong in Programming?

    Results (296 votes), past polls