open (FILE '<file.txt'); my @file = <FILE>; close FILE; foreach my $line (@file) { exit if $line =~ /error.*error/; # Process here }
In reply to Re: match a word then exit
by Lawliet
in thread match a word then exit
by ktl
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |