in reply to Extracting data from a messy file (slow performance)
I suggest you rewrite that program in Perl, or awk. Where exactly are you having problems? This website is not a "script writing site" where we produce Perl scripts.