#! /usr/bin/perl -w use strict; use Net::POP3; my $POPObj = Net::POP3->new("mail.myisp.net", Timeout => 10); my $Ret = $POPObj->login("AnonMonk", "BrokenPass"); if ($Ret) { if ($Ret eq "0E0") { print "You have no messages...\n"; } elsif ($Ret) { print "You have $Ret messages\n"; } } else { print "Something went wrong...\n"; } $POPObj->quit();