Help for this page
Select Code to Download
Select
or
download this
my $msg_ids = $imap->search("ALL", "DATE");