in reply to use (of) Net::POP3
$pop is undefined, the new call failed.
a method call is a subroutine call on an object (!?), new is a sub (the constructor) in the Net::POP3 module, and so is login.
Try to replace
withmy $pop = Net::POP3->new('localhost', Timeout => 30);
my $pop = Net::POP3->new('localhost', Timeout => 30) or die("Can't ins +tantiate Net::POP3 object");
Are you sure a pop3 server is listening on your localhost? I tried the snippet and it works if the host is listening, and fails if it doesn't.
regards,
tomte
Hlade's Law:
If you have a difficult task, give it to a lazy person --
they will find an easier way to do it.
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re: Re: use (of) Net::POP3
by atnonis (Monk) on Jun 21, 2003 at 11:34 UTC |