macubergeek
IS-IT--Management
I currently have a script that works fine.
It loads file A into an array. It then searches for each line in @A in file B.
It then reports back to me which lines in @A that id DOESN'T find in file B.
I'm printing out these results with:
print FH (@aonly, $item);
-------------------------
The Problem is, I'm getting results like
Blah Blah Blah0
or
Blah Blah Blah1
and I want to print just:
Blah Blah Blah is not in compliance
I also get:
Hi how are yaEnabled
or
Hi how are yaDisabled
and I want to print just:
Hi how are ya is not in compliance
well here's the code I'm working with thats NOT working
The last line is buggered. I'm getting this error:
C:\Documents and Settings\kellyji\My Documents\SCRIPTS\windows_scripts\Windows_P
erl_reg>perl file_compare.pl
Bareword found where operator expected at file_compare.pl line 76, near ") is"
(Missing operator before is?)
syntax error at file_compare.pl line 76, near ") is "
Execution of file_compare.pl aborted due to compilation errors.
I was hoping someone could point out what I've screwed up here ;-)
It loads file A into an array. It then searches for each line in @A in file B.
It then reports back to me which lines in @A that id DOESN'T find in file B.
I'm printing out these results with:
print FH (@aonly, $item);
-------------------------
The Problem is, I'm getting results like
Blah Blah Blah0
or
Blah Blah Blah1
and I want to print just:
Blah Blah Blah is not in compliance
I also get:
Hi how are yaEnabled
or
Hi how are yaDisabled
and I want to print just:
Hi how are ya is not in compliance
well here's the code I'm working with thats NOT working
Code:
$item =~ s/$0//g;
$item =~ s/$1//g;
$item =~ s/$Enabled//g;
$item =~ s/$Disabled//g;
print FH (@aonly, $item) is not in compliance;
C:\Documents and Settings\kellyji\My Documents\SCRIPTS\windows_scripts\Windows_P
erl_reg>perl file_compare.pl
Bareword found where operator expected at file_compare.pl line 76, near ") is"
(Missing operator before is?)
syntax error at file_compare.pl line 76, near ") is "
Execution of file_compare.pl aborted due to compilation errors.
I was hoping someone could point out what I've screwed up here ;-)