What I am trying to do is leverage the speed of grep to complete the task. The data files are huge and I have found that grep is significantly faster than even running the files through an empty Perl loop.
The fastest current implementation I have found is using grep with the context (50) option to get 50 lines around the match, then use a loop in Perl just as you have shown to parse that data. I was wondering if this line idea might even be faster and more efficient, if I can only find a better way to get the line numbers of headers around the match.
In reply to Re: search array for closest lower and higher number from another array
by bigbot
in thread search array for closest lower and higher number from another array
by bigbot
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |