Discipulus has asked for the wisdom of the Perl Monks concerning the following question:
greetings from sunny but cold romause Win32::TieRegistry ( Delimiter=>"/" ); [...] sub findodbc { $lista= $Registry->Connect( "$ip", "LMachine" )or die "Can't connect +to HostA's HKEY_LOCAL_MACHINE key: $^E\n"; $lista=$Registry->{"HKEY_LOCAL_MACHINE/Software/ODBC/ODBC.INI"}or di +e "$^E\n"; foreach $nom(keys (%$lista)) { print $nom; chop $nom; $coso= $Registry->{"HKEY_LOCAL_MACHINE/Software/ODBC/ODBC.INI/$nom"} +or die "$^E\n"; print "\n$nom\t".$coso->{DBQ}or die $!; if (defined $coso->{DBQ}) { if($coso->{DBQ}=~/\\([\w -]+\\)(database\\)(\w+\.mdb)/){$odbc{$1.$3 +}=$nom} } while (($k, $v)=each(%odbc)){print "$k--------$v\n"} } exit; }
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re: Win32::TieRegistry disperate situation
by dada (Chaplain) on Nov 07, 2002 at 12:18 UTC | |
by Discipulus (Canon) on Nov 07, 2002 at 12:57 UTC |