Beefy Boxes and Bandwidth Generously Provided by pair Networks
We don't bite newbies here... much
 
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. =/

Log In?
Username:
Password:

What's my password?
Create A New User
Node Status?
node history
Node Type: note [id://932459]
help
Chatterbox?
[Corion]: Congratulations Lady_Aleena ;)
[Lady_Aleena]: Thanks Corion.
[Lady_Aleena]: This is one of my oldest accounts on the web. 8)
[Corion]: Lady_Aleena: Hehe - I think this is also my oldest active account on the web. I have an old university email address but that only gets spam nowadays :)
Discipulus arrived at work 1 hour late.. he do not noticed the clock bell
[Lady_Aleena]: My Wikipedia account is 3 years - 10 days younger.

How do I use this? | Other CB clients
Other Users?
Others browsing the Monastery: (8)
As of 2017-04-26 07:42 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?
    I'm a fool:











    Results (469 votes). Check out past polls.