J
joe
Hi all,
I am writting a perl script to check my windows 2000 registry to make
sure some keys were added after I installed some software. In my
script I use:
system "regedit \e ....
To dump the registry to a file, I then open this file and do following
to see if
my key is in the file:
while (<fhTestFile>) {
if (index ($_, $testValue) > -1) {
close (fhTestFile);
return ("TRUE");
}
}
The problem I have is that the registry file looks like there are
space between
each char in it. So I maybe looking for:
LOCAL_MACHINE_SOFTWARE
The file contains:
L O C C L _ M A C H I N E _ S O F T W A R E
So my match does not work, also I don't thing the blank spaces are
just extra spaces. Because I added spaces to $testValue and it still
didn't match. Does anyone have any idea what this extra char is? And
how I can get ride of it? I already tried addind chomp $_ before the
if and that didn't help.
Thanks,
Zim
zzzz
I am writting a perl script to check my windows 2000 registry to make
sure some keys were added after I installed some software. In my
script I use:
system "regedit \e ....
To dump the registry to a file, I then open this file and do following
to see if
my key is in the file:
while (<fhTestFile>) {
if (index ($_, $testValue) > -1) {
close (fhTestFile);
return ("TRUE");
}
}
The problem I have is that the registry file looks like there are
space between
each char in it. So I maybe looking for:
LOCAL_MACHINE_SOFTWARE
The file contains:
L O C C L _ M A C H I N E _ S O F T W A R E
So my match does not work, also I don't thing the blank spaces are
just extra spaces. Because I added spaces to $testValue and it still
didn't match. Does anyone have any idea what this extra char is? And
how I can get ride of it? I already tried addind chomp $_ before the
if and that didn't help.
Thanks,
Zim
zzzz