# from your own example my $outlook = new Win32::OLE('Outlook.Application'); my $ns = $outlook->GetNameSpace("MAPI") or die "can't open MAPI namespace\n"; my $folders = $ns->Folders(); # get the folders collection foreach my $folder (in @$folders) { # here $folder will be set to each folder in turn }