in reply to perl performance vs egrep

In this situation i'd investigate whether regexes are even required. I bet the following is faster:

my %skip=map {$_=>1} qw(CPXX1 KLXX1 KMXX1 MEXX1 PAXX1 PMXX1 SLXX1 SZXX +1 WXXX1 YZXX1); while ( <IFILE>) { print OFILE unless $skip{substr($_,0,5)}; }
---
demerphq