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
Of course, if you misspell a function you'll get the same error, but this is not the issue here.perldoc -f inet_aton
further documentation
|
---|
In Section
Seekers of Perl Wisdom