Index: Win32.pm =================================================================== --- Win32.pm (revision 7604) +++ Win32.pm (working copy) @@ -14,10 +14,15 @@ use Win32::Registry; sub init { + my ($class) = @_; my $defaults = $class->defaults; + # my $self = bless({ %{$class->defaults} }, $class); + # + # $self->{'debug'} = 1; + my ($resobj, %keys); my $root = 'SYSTEM\CurrentControlSet\Services\Tcpip\Parameters'; @@ -85,6 +90,7 @@ my $bind_linkage; my @sorted_interfaces; + print ";; DNS: Getting sorted interface list\n" if $self->{'debug'}; $main::HKEY_LOCAL_MACHINE->Open('SYSTEM\CurrentControlSet\Services\Tcpip\Linkage', $bind_linkage); if($bind_linkage){ @@ -92,10 +98,11 @@ my $type; $bind_linkage->QueryValueEx('Bind', $type, $bind_linkage_list); if($bind_linkage_list){ - @sorted_interfaces = split(m/(?:\n|\s)+/, $bind_linkage_list); + @sorted_interfaces = split(m/[^\w{}\\-]+/s, $bind_linkage_list); } foreach my $interface (@sorted_interfaces){ $interface =~ s/^\\device\\//i; + print ";; DNS:Interface: $interface\n" if $self->{'debug'}; } }