Re: Calling IO::Socket::INET getting an error.

Bjoern Hoehrmann (derhoermi@gmx.net)
Sun, 25 Mar 2001 20:45:08 +0200


* Hansen, Keith wrote:
>I'm getting the error:
>
>  Undefined subroutine &IO::Socket::INET called at C:\Perl\gnx\lgetr.pl line
>7.
>

>my $fh = IO::Socket::INET($server);

IO::Socket::INET is a package and no subroutine, you have to call the
constructor method:

  my $handle = IO::Socket::INET->new( ... ) # or
         ... = new IO::Socket::INET( ... )
-- 
Björn Höhrmann ^ mailto:bjoern@hoehrmann.de ^ http://www.bjoernsworld.de
am Badedeich 7 ° Telefon: +49(0)4667/981028 ° http://bjoern.hoehrmann.de
25899 Dagebüll # PGP Pub. KeyID: 0xA4357E78 # http://learn.to/quote [!]e
            -- listen, learn, contribute -- David J. Marcus