In addition to the previous suggestions, you can eliminate the loop over @configLineItems by compiling a regular expression with qr like this:
my $regex = join '|', map {quotemeta} @configLineItems; $regex = qr/$regex/;
(If @configLineItems contains regular expressions, then drop the "map {quotemeta}".)
This is something you can do when you read the configuration file before the loop over the input file, storing $regex for use during the main loop over the input. You can then use it like so: if ($Line[6] =~ $storedRegex)
As was said earlier, as much as we like to help, this isn't a code writing service - please try to implement these suggestions and if you need help doing so please don't hesitate to ask.
In reply to Re: Regex perl grep usage string match comparison
by Anonymous Monk
in thread Regex perl grep usage string match comparison
by justinkala
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |