in reply to Optimizing Perl?

Precompile your patters. Example:
my $re = qr/this RegEx will be used 10,000 times/; open FH, "<file.dat" or die "Error : $!\n"; while (<FH>){ process() if /$re/; } close FH;
You can refer to perldoc perlretut for additional information.

--perlplexer