Is this your entire script? No
use strict; or
use warnings; Did you read the module documentation? Did you try the example that comes with the distribution (demos/pop3)? Why are you declaring
$pop twice, once after the other, the difference being that the second declaration includes the
Timeout option in the constructor? This looks like a copy and paste from the documentation, rather than reading the documentation and understanding what it is telling you. On this note, since you are having problems you could enable debugging:
my $pop = Net::POP3->new('pop3host', Timeout => 60, Debug => 1);
Are you sure the server in question supports pinging? Have you checked via the
capabilities() method mentioned in the
documentation?
Perhaps taking a step back and rereading the documentation, and reading some of the basic
tutorials here will help you.
Please read
How do I post a question effectively?,
Writeup Formatting Tips and the
PerlMonks FAQ.
Martin