From the docs for
Net::POP3:
reset ()
Reset the status of the remote POP3 server. This includes reseting the status of all messages to not be deleted.
quit ()
Quit and close the connection to the remote POP3 server. Any messages marked as deleted will be deleted from the remote mailbox.
In POP3, the quit command is not optional. The session ending without a quit means no destructive actions will be taken. This is per RFC 1939. Take a look at section 6, titled "The UPDATE State". It says, among other things, this:
When the client issues the QUIT command from the TRANSACTION state,
the POP3 session enters the UPDATE state. (Note that if the client
issues the QUIT command from the AUTHORIZATION state, the POP3
session terminates but does NOT enter the UPDATE state.)
If a session terminates for some reason other than a client-issued
QUIT command, the POP3 session does NOT enter the UPDATE state and
MUST not remove any messages from the maildrop.