Folks,

I'm using Win32::TieRegistry to read a list of elements in a REG_MULTI_SZ
and I need help with the printing of the references returned when I use
$key->SplitMultis(1).

use Win32::TieRegistry ( Delimiter => "/" ); 
$RegKey = "LMachine/System/CurrentControlSet/Services/Tcpip/Linkage/";
$key = $Registry->{$RegKey}; 
$key->SplitMultis(1);   #  returned as a reference to an array of strings
$ValueString = $key->GetValue('bind'); # this is my reference

>>  All this works and I figured out how to print individual references by:

print "$ValueString->[0] \n $ValueString->[1]";
>> \Device\{531DA74F-9197-42AA-B8D8-BDA2E6F86908}
>> \Device\NdisWanIp

The problem arises where I don't know how many strings will be in that
$ValueString MULTI_SZ, could be 2, could be 10.  Does anybody know how can
get the total number of elements in this reference?  I'm thinking something
similar to $num = scalar(@array).

Thanks,

Ben


Ben Conrad
Sr. Network Administrator
180 Old Colony Avenue
Quincy, MA  02170
Passkey International, Inc.
[T] 617.237.8225
[M] 617.852.6206
[F] 617.328.1461
http://www.passkey.com

_______________________________________________
Perl-Win32-Users mailing list
Perl-Win32-Users@listserv.ActiveState.com
To unsubscribe: http://listserv.ActiveState.com/mailman/mysubs

Reply via email to