Beefy Boxes and Bandwidth Generously Provided by pair Networks
Keep It Simple, Stupid

Re^3: Columnwise parsing of a file

by Tux (Abbot)
on Feb 26, 2013 at 10:00 UTC ( #1020648=note: print w/replies, xml ) Need Help??

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

If your data is formatted that liberal, you are completely on your own. There ought to be rules for determining where fields/columns start and end. If there are no rules, you cannot parse. Period.

Is the current "format" the only possible format? Can the "data" be generated as something that does have rules, like CSV? When the data is well-formatted CSV, you can use Text::CSV_XS to parse the data and use all advice already given, or even easier, use Spreadsheet::Read (in combination with Text::CSV_XS) to get direct access to every "cell" in your dataset.

Enjoy, Have FUN! H.Merijn

Log In?

What's my password?
Create A New User
Node Status?
node history
Node Type: note [id://1020648]
[marto]: at times mine surprise me with this behavior :)
[Corion]: I mean, in a way it would be nicer+easier if they always where that obedient, but it's comforting to see that they are when it matters, at least for now ;)

How do I use this? | Other CB clients
Other Users?
Others cooling their heels in the Monastery: (4)
As of 2016-12-08 09:33 GMT
Find Nodes?
    Voting Booth?
    On a regular basis, I'm most likely to spy upon:

    Results (138 votes). Check out past polls.