and this appears to work. My only question is this: Am I truely saving CPU time by doing this, or does perl still have to do something special to turn that string I got from a file into a regular expression.$re = qr/$foo/; print FILE $re, "\n"; # ... and at a later time ... $re = <FILE> chomp $re; if($line =~ /$re/) { # blah blah blah....
In reply to precompiling regexes by bless$self=>perlmonks;
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |