my $pop = Net::POP3->new( $server, Debug => 0 ) || die $!; if ( $pop->login( $u_name, $p_word ) > 0 ) { my $msgnums = $pop->list() || die $!; foreach my $msgnum ( sort keys %$msgnums ) { my $uidl = $pop->uidl( $msgnum ); ## Check if message was previously read ## If not, read, parse, and move on } }