Beefy Boxes and Bandwidth Generously Provided by pair Networks
"be consistent"
 
PerlMonks  

Re: parsing malformed CSV with per column quote chars

by dasgar (Deacon)
on Aug 07, 2014 at 18:19 UTC ( #1096675=note: print w/ replies, xml ) Need Help??


in reply to parsing malformed CSV with per column quote chars

Just did a quick search on metacpan for "tie hash csv". It looks like Tie::Handle::CSV might be doing something along the lines of what you want. After doing a quick scan through its documentation, it looks like it shouldn't be too difficult to create a hash using this module.

If I understand your previously used method correctly, Tie::Array::CSV can easily parse out a CSV file into an AoA structure - or as I like to think of it, a two dimensional array. It also allows you to pass parameters to Tie::File and Text::CSV, which it uses to do all of the real work.


Comment on Re: parsing malformed CSV with per column quote chars

Log In?
Username:
Password:

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

How do I use this? | Other CB clients
Other Users?
Others pondering the Monastery: (8)
As of 2014-11-27 00:44 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    My preferred Perl binaries come from:














    Results (178 votes), past polls