Anonymous Monk has asked for the wisdom of the Perl Monks concerning the following question:
This is from the newest of POP3Client v 5.8.0 HELP, obviouisly this is just a connection issuesub Connect { my ($me, $host, $port) = @_; $host and $me->Host($host); $port and $me->Port($port); my $s = $me->{SOCK}; if (defined fileno $s) { # close and reopen... $me->Close; } socket($s, PF_INET, SOCK_STREAM, getprotobyname("tcp") || 6) or $me->Message("could not open socket: $!") and return 0; connect($s, pack($sockaddr, AF_INET, $me->{PORT}, $me->{ADDR}) ) or $me->Message("could not connect socket [$me->{HOST}, $me->{POR +T}]: $!") and return 0; select((select($s) , $| = 1)[0]); # autoflush defined($msg = <$s>) or $me->Message("Could not read") and return +0; chop $msg; $me->Message($msg); $me->State('AUTHORIZATION'); $me->User and $me->Pass and $me->Login; } # end Connect
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re: Mail::POP3Client Connection
by BrowserUk (Patriarch) on Jul 08, 2003 at 19:08 UTC | |
|
Re: Mail::POP3Client Connection
by Thelonius (Priest) on Jul 08, 2003 at 19:57 UTC |