I have a list of items in one file (ITEMS). I need to loop through this list of items and search another file(LOGFILE) to see if the item string is anywhere in the log file.
For speed's sake it only needs to find one instance of the item string and kick out. So whether it is in the logfile once or three thousand times does not matter.
I would like to output whether the account string was found or not found.
Do I open the item list file and enter into a while loop, and then within the while loop search the file? I'd rather keep it within Perl rather than going out to the shell to grep for it. Is there an easy way to "load" the whole logfile (60,000 lines) only once while doing the search? Ther are many examples of a search but the search criteria is always a fixed single element. Any help would be appreciated.
For speed's sake it only needs to find one instance of the item string and kick out. So whether it is in the logfile once or three thousand times does not matter.
I would like to output whether the account string was found or not found.
Do I open the item list file and enter into a while loop, and then within the while loop search the file? I'd rather keep it within Perl rather than going out to the shell to grep for it. Is there an easy way to "load" the whole logfile (60,000 lines) only once while doing the search? Ther are many examples of a search but the search criteria is always a fixed single element. Any help would be appreciated.