Moby writes: > I translated the code to Perl as follows: > # Begin Perl
You should *really* insert use strict; and maybe also use warnings; > use Win32::OLE; This should be: use Win32::OLE qw(in); > use Win32::OLE::Variant; > use Win32::OLE::Const('Citrix MetaFrame COM Library'); > > $objFarm = new Win32::OLE("MetaFrameCOM.MetaFrameFarm", "myserver"); > > if (Win32::OLE->LastError() != 0) { > print "Couldn't create a farm object \n"; > print Win32::OLE->LastError(); > exit 0; > } > > $objFarm->Initialize(1); > if (Win32::OLE->LastError() != 0) { > print "Couldn't initialize a farm object \n"; > print Win32::OLE->LastError(); > exit 0; > } > print STDOUT "Farm name is ".$objFarm->FarmName."\n"; You don't seem to initialize $licSets. You need something like my $licSets = $objFarm->LicenseSets(1); > foreach my $aLicense (in $licSets) { Cheers, -Jan _______________________________________________ Perl-Win32-Users mailing list Perl-Win32-Users@listserv.ActiveState.com To unsubscribe: http://listserv.ActiveState.com/mailman/mysubs