Here is my code. By using this code i'm comparing the contents of File_A with the predefined string in $fine variable...But i need to read it from File_B. I'm stucked while reading from File_B and compare with File_A.
File_B contains the keywords added daily and these keywords are the suscpecious activity keywords in http log files.
Code:
#!/usr/bin/perl -w
my $find = "a2billing";
open LOGFILE, "<File_A.txt";
How to compare each and every line in File_A with the every line in File_B
I have httpd logs in File_A and some suspecious keywords in File_B. Now i need to compare the every line in File_A with each and every keyword present in File_B. if the keyword in File_B found in any line of File_A then print that entire line of File_A. How can i compare those two files in perl
Leave a comment: