Hi all,
I am trying to rewrite this VBScript in Perl.
'do a query
'----------
set Machines = WbemServices.ExecQuery("select * From SMS_R_System")
For Each Machine in Machines
wscript.echo Machine.Name + ": " + Machine.IPAddresses(0)
Next
Question:
What is the correct syntax of the VB array element
"Machine.IPAddresses(0)" in Perl?
Here is a sample of my code (I am unable to get the
IP address to compile properly):
my ($Enum, $machine);
$Enum = Win32::OLE::Enum->new($objSet);
while ( defined( my $machine = $Enum->Next() ) )
{
print "Machine: ", $machine->{Name}, ", and it's IP address is:",
$machine->{$IPAddresses[0]}, "\n";
}
Thanks in advance,
FJB
_______________________________________________
Perl-Win32-Admin mailing list
[EMAIL PROTECTED]
http://listserv.ActiveState.com/mailman/listinfo/perl-win32-admin