use strict; use warnings; use Win32::OLE; use Win32::OLE::Const 'Microsoft Outlook'; my $outlook = Win32::OLE->new('Outlook.Application') or die Win32::OLE->LastError; my $namespace = $outlook->GetNamespace("MAPI"); my $folder = $namespace->GetDefaultFolder(olFolderInbox) or die Win32::OLE->LastError; # <--- dead my $items = $folder->Items; print STDERR "Folder: ", $folder->Name, "\n"; print STDERR "Total entries: ",$items->Count, "\n"; __DATA__ The error message is something about "METHOD/PROPERTYGET getdefaultfolder"