in reply to Get messages via IMAP with Perl?
update: whoops the OP wants new messages. In that case you use the qty_recent method or query the unseen response directly.
After logging in, authenticating, and selecting the mailbox, you want to use the qty_messages method. It returns the number of messages.
--
જલધર
In Section
Seekers of Perl Wisdom