laziness, impatience, and hubris | |
PerlMonks |
Re: Pimp My RegExby jcoxen (Deacon) |
on Jun 01, 2005 at 14:25 UTC ( [id://462478]=note: print w/replies, xml ) | Need Help?? |
I have to do stuff like this fairly often with a bunch of different format files so I just keep this around as a generic framework. I modify the regex statements, delimiter and number of fields as necessary but it's pretty much the same program every time. Here's what I use - lifted almost completely from various posts here on PM...
BTW, this code processed an 8 million line/385 mb file in about 33 minutes the other day on my old, anemic Sun Ultra 5 workstation. No brownouts, no sweat. System load never got above 1.05. Jack
In Section
Seekers of Perl Wisdom
|
|