Keep It Simple, Stupid | |
PerlMonks |
comment on |
( [id://3333]=superdoc: print w/replies, xml ) | Need Help?? |
ministry,
You might want to take a look at PPT::Util's tcgrep. In general, a compiled command line tool for a specific task is going to be faster than perl which is designed to be flexible. Depending on your specific needs, it is possible to make perl win. For instance, if you only care if the search string is present in the file, you can abort as soon as it is found. You can also use a sliding window buffer so that less disk I/O is involved. I did this very thing shortly after joining the Monastery nearly 3 years ago. My cow orkers were impressed and my code replaced the shell scripts in production. Cheers - L~R In reply to Re: pattern match -vs- *ix grep
by Limbic~Region
|
|