use Win32::OLE; use Win32::OLE::Const ('Microsoft Outlook'); my $ol = new Win32::OLE 'Outlook.Application'; my $sess = $ol->GetNamespace('MAPI') or die ; for my $folder ( $sess->GetDefaultFolder( olFolderInbox ) ) { print qq(\nUnRead items in folder "), $folder->FolderPath, qq(":\n\n); my $items = $folder->Items; local( $\, $, ) = ( "\n", "\t" ); print $_->ReceivedTime->Date, $_->Subject for grep $_->UnRead, in $items; }