$cs1 = Win32::OLE->GetActiveObject("CS.CSInterface1") or die "Could not get interface CS1\n"; ... my ($on, $off, $count) = $_; # contains args !!! SHOULD USE ARRAY HERE !!! $cs1->FlashLamp($on, $off, $count);