Try to do this way:
while(<$read_tmp_log>) { # reads input line if ( /error|fatal|critical/i ) { # if the line contains error, fata +l or critical case insensitively ... # process data } }
In reply to Re^3: Print line from file only once even if occurrence of pattern is more than once in the line
by pme
in thread Print line from file only once even if occurrence of pattern is more than once in the line
by jayu_rao
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |