http://www.perlmonks.org?node_id=932459


in reply to How to parse this file

Ok, I'm in a lazy mood to type code right now, but in the spirit of TIMTOWTDI, tell me what you guys think of the following idea:
Instead of doing a "constructive parsing" do a "destructive" one?

Pseudo-code would be something like:
open infile open outfile foreach (<inputfile>){ $_ =~ s/[letters]//g $_ =~ s/\s{2}//g #remove excess whitespace print $_ outfile } close infile close outfile


Just my 2cents anyway, what say you fellow monks?

UPDATE: Just entered and read tye's link, that should teach me to actualy read the link other monk's post answering questions before i rush into answering them myself. =/