Beefy Boxes and Bandwidth Generously Provided by pair Networks
Syntactic Confectionery Delight
 
PerlMonks  

Re: Undefined Subroutine & Global symbol requires explicit package name

by rovf (Priest)
on Jan 24, 2012 at 15:31 UTC ( [id://949713]=note: print w/replies, xml ) Need Help??


in reply to Undefined Subroutine & Global symbol requires explicit package name

From your question, I assume that you are a beginner in Perl. In this case, I recommend that you add use diagnostics; in addition to strict and warnings. It will give you more information about the messages.

%dns_check = ("address" => "ip");
You should always "declare" your variables, to tell Perl whether you want to have a lexically scoped or a globally scoped variables. For the time being (until you get more experience), I suggest you use only lexically scoped variables. You declare it using my:
my %dns_check = ("address" => "ip");
See my.

-- 
Ronald Fischer <ynnor@mm.st>

Log In?
Username:
Password:

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

How do I use this?Last hourOther CB clients
Other Users?
Others pondering the Monastery: (4)
As of 2024-04-25 23:28 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found