in reply to convert some marco to perl

It helps to know a bit about Visual Basic when translating from Visual Basic to Perl. The := syntax is for named arguments. Read the Win32::OLE documentation about them:

$ex->Dmethod($RequiredArg1, {NamedArg1 => $Value1, NamedArg2 => $Value +2});