Beefy Boxes and Bandwidth Generously Provided by pair Networks
P is for Practical
 
PerlMonks  

Re^3: Undefined Subroutine & Global symbol requires explicit package name

by lune (Pilgrim)
on Jan 24, 2012 at 18:31 UTC ( [id://949741]=note: print w/replies, xml ) Need Help??


in reply to Re^2: Undefined Subroutine & Global symbol requires explicit package name
in thread Undefined Subroutine & Global symbol requires explicit package name

You didn't really understand the first answer you got on the issue: "where did you find inet_aton documented?".

When you call a subroutine, it must be defined somewhere, unless it is a builtin Perl function, like "each" and "print" in your example. In your code, you want to use functions from the module "Socket.pm" - so you have to "use Socket" to make these functions available.

You can tell that inet_aton is not a Perl function simply by checking with man perlfunc or by trying

perldoc -f inet_aton

Of course, if you misspell a function you'll get the same error, but this is not the issue here.

further documentation

Log In?
Username:
Password:

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

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

    No recent polls found