in reply to Comparing pattern
Look at study, especially if you have a lot of patterns you are matching against. Also, use the 3-argument form of open whenever possible (though that won't speed up your program any.) If you plan to extend this to multiple files, you should precompile your regexps with qr//. Also, take a look at setting local $/ for file slurping, which will be faster than reading lines and joining.
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re^2: Comparing pattern
by mrc (Sexton) on Sep 18, 2009 at 16:11 UTC | |
|
Re^2: Comparing pattern
by mrc (Sexton) on Sep 21, 2009 at 09:08 UTC | |
by bv (Friar) on Sep 21, 2009 at 15:22 UTC | |
by mrc (Sexton) on Sep 21, 2009 at 17:54 UTC |