I can't help you much — this is outside my area of expertise — but I see some problems.
In Inbox = $ns->GetDefaultFolder(olFolderInbox);, are you sure olFolderInbox is correct? Be sure to use use strict; and use warnings;.
if ($Inbox->Items->$Count = 0) {
should be
if ($Inbox->Items->Count = 0) {
foreach ($Inbox->Items) {
should be
foreach (in $Inbox->Items) {
Don't forget to import in:
use Win32::OLE qw( in );
In reply to Re: How do I convert VBA script to Perl? - Using Win32::OLE
by ikegami
in thread How do I convert VBA script to Perl? - Using Win32::OLE
by Win
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |