Beefy Boxes and Bandwidth Generously Provided by pair Networks
laziness, impatience, and hubris
 
PerlMonks  

Re^3: Columnwise parsing of a file

by topher (Scribe)
on Feb 26, 2013 at 16:15 UTC ( #1020719=note: print w/ replies, xml ) Need Help??


in reply to Re^2: Columnwise parsing of a file
in thread Columnwise parsing of a file

How in this case I would handle the spaces each cell (eg: col 0 row 1 etc) content is having.

If you are using spaces as field delimiters, and you have (non-escaped) spaces in your data, you don't handle it. You're asking the wrong question and trying to solve the wrong problem.

The problem isn't how to parse the data, it's how to get valid data. Data in a format that can't be cleanly parsed is what we usually call garbage data.

A well known maxim in the Database world (and elsewhere in IT), is "Garbage in, Garbage out". If you can't provide good data to process, or come up with a way to clean up your data before processing, you will never valid, reliable, trustworthy results out.

Additionally, once you find a way to either get clean data or properly clean up your data, the parsing will likely be much simpler to figure out.

Christopher Cashell


Comment on Re^3: Columnwise parsing of a file

Log In?
Username:
Password:

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

How do I use this? | Other CB clients
Other Users?
Others chanting in the Monastery: (11)
As of 2014-10-30 17:09 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    For retirement, I am banking on:










    Results (208 votes), past polls