use Net::POP3; my $pop = Net::POP3->new("pluto.runbox.com"); if ($pop) { my $msg = $pop->login("test21","test"); if ($msg) { $msg eq '0E0' and $msg = 0; print $msg." messages\n"; } else { print "Couldn't read...\n" } $pop->quit(); } else { print "Couldn't connect...\n" }