in reply to Re: grepping for
in thread grepping for

Put the /o modifier on the end of those regexes. Since $dir and $error don't appear to change at all during the loop, you can optimize the regexp by only building it once. Could save some time.