I need to compare 2 Error logs and display only the new errors.
Basically I need it to go through and anything that's in file A but not in file B needs to be shown.
I got this from someone else but they used it to match numbers and it doesn't work as well for text.
@out is initialized to the newer of the files.
@early is the older file.
## For each value $word in @early
foreach $word (@early) {
## Remove from @out elements whose value is $word
@out = grep (!/^$word$/, @out);
}
print "@out\n";
Basically I need it to go through and anything that's in file A but not in file B needs to be shown.
I got this from someone else but they used it to match numbers and it doesn't work as well for text.
@out is initialized to the newer of the files.
@early is the older file.
## For each value $word in @early
foreach $word (@early) {
## Remove from @out elements whose value is $word
@out = grep (!/^$word$/, @out);
}
print "@out\n";