in reply to Help w/ approach using Net::Pop3

POP3 provides a special (temporary?) id that stays unique and unchanged at least during the time of the session, even when you delete messages: the uidl. You can use that as the basis for a better tracking system for which messages you've read: with two uidl hashes, you have both the old and the new message number, and by inverting one hash
%msgnum = reverse %uidl;
you can map
old message number -> uidl -> new message number
or, in Perl:
$new_msgnum = $msgnum2{$uidl1{$msgnum}};

As I currently don't have a pop3 mailbox available for testing purposes, I can't really test it and the code is just pseudocode, just giving a general outline, and not real working code.

But what I don't get... as long as the connection isn't closed, the messages aren't renumbered, or are they? That's how I remember it.