Beefy Boxes and Bandwidth Generously Provided by pair Networks
Problems? Is your data what you think it is?
 
PerlMonks  

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?
Username:
Password:

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

How do I use this? | Other CB clients
Other Users?
Others wandering the Monastery: (14)
As of 2014-07-30 19:47 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    My favorite superfluous repetitious redundant duplicative phrase is:









    Results (240 votes), past polls