Beefy Boxes and Bandwidth Generously Provided by pair Networks
XP is just a number

Re: How to parse this file

by Caio (Acolyte)
on Oct 19, 2011 at 18:36 UTC ( #932459=note: print w/ replies, xml ) Need Help??

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. =/
Comment on Re: How to parse this file
Download Code

Log In?

What's my password?
Create A New User
Node Status?
node history
Node Type: note [id://932459]
and the web crawler heard nothing...

How do I use this? | Other CB clients
Other Users?
Others having an uproarious good time at the Monastery: (3)
As of 2016-05-28 02:37 GMT
Find Nodes?
    Voting Booth?