Hi Lance,
I don't know if this is too general for your purposes, but this
should look through a whole file and find anyplace that the word
"running" appear in three consecutive lines.
open (INFILE, "+<somefile.txt") or die "could not read file\n";
@all_lines = <INFILE>;
for (0 .. ($#all_lines-2)){
if (
($all_lines[$_] =~ m/running/gi) and
($all_lines[($_+1)] =~ m/running/gi) and
($all_lines[($_+2)] =~ m/running/gi)
)
{
Do some stuff...
}
}
--
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]