#!c:/sw/perl/bin/perl.exe use warnings; use strict; use Win32::OLE; our $project; sub OLECheck (&$) { my ($sub,$msg) = @_; my $result = eval &$sub; die "Couldn't $msg: $@" if $@; my $error = Win32::OLE->LastError(); die "Couldn't $msg: $error" if $error; $result; } OLECheck {$project = Win32::OLE->new("ISWiAutomation9.ISWiProject");} "instantiate the Developer Automation Interface"; print "success!\n";