jayu_rao has asked for the wisdom of the Perl Monks concerning the following question:
I have written a code that matches the occurrence of the words like Error / Fatal etc from a log file and printing it to a temporary file.
However, the problem is that the words can occur more than once in a line like " ERROR - Critical error" or something like FATAL - Fatal error and this causes the lines to get printed more than once because of the patterns getting repeated more than once.Can someone help me in suggesting a way to print the lines only once per occurrence in a line with an example?
Regards,Jay
|
|---|