I get a daily email attachment to my Gmail account which I want to automatically download. I found the following Perl script which does just that:
http://stackoverflow.com/questions/2453548/how-can-i-download-imap-mail-attachments-over-ssl-and-save-them-locally-using-pe The above script uses the following syntax to search the messages via IMAP: my @messages = $imap->search(SUBJECT => $today); In my case, I want to search on two criteria, subject and date. I tried various ways such as: my @messages = $imap->search(SUBJECT => $subject, ON => $today); my @messages = $imap->search({SUBJECT => $subject, ON => $today}); my @messages = $imap->search("SUBJECT => $subject, ON => $today"); but none of these worked. How can I search on multiple criteria using Mail::IMAPClient? Thanks, Chris