in reply to gmail pop3 message deletion bug?
Does it help to call $pop->quit() at the end instead of just exit?