Your skill will accomplish what the force of many cannot |
|
PerlMonks |
Re: Need help to fine tune perl script to make it faster( currently taking more than 30 minutes)by roboticus (Chancellor) |
on Nov 14, 2012 at 02:55 UTC ( [id://1003735]=note: print w/replies, xml ) | Need Help?? |
I'd suggest not shelling out to sed to print a line. Instead, read the file into an array and print the appropriate line. That would be better than rescanning the file over and over. Or build an array of lines to print, then after the while loop, scan the file once, printing each line in your array. ...roboticus When your only tool is a hammer, all problems look like your thumb.
In Section
Seekers of Perl Wisdom
|
|