add a else{ last } to the if statement so it doesn't bother reading the rest of the file.Careful if there are holes in your test range... you might jump out of the loop too early. In that case, it's best to do an explicit compare against the maximum line number you're interested in.
elsif($. > $lastline) { last; }
In reply to Re^3: Matching on a specific line of text
by bart
in thread Matching on a specific line of text
by kingdom
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |