Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations gkittelson on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Help converting a section of Perl to VBScript

Status
Not open for further replies.

galli

IS-IT--Management
Apr 16, 2004
21
NZ
Hi there guys

I have a perl script that gets some basic system info data, and it has a section that converts a Western Digital Serial Number in Win32_PhysicalMedia in to a readable form.

Here is the section of the perl script:

foreach my $hdd ( in( $WMIServices->InstancesOf( $Class2 ) ) )
{
$sn=pack H36, $hdd->{serialNumber}."\n";
for ($ch=0;$ch<=18;$ch=$ch+2) {
$sn2=$sn2.substr($sn,$ch+1,1);
$sn2=$sn2.substr($sn,$ch,1);
}
push (@hdd,$sn2);
undef $sn2;
}

Does anyone know if it is possible to convert to VBScript?

Any help would be great!!!

Cheers

Ben
 
Can't you use the Hex function ?

Hope This Helps, PH.
FAQ219-2884
FAQ181-2886
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top