Beefy Boxes and Bandwidth Generously Provided by pair Networks
Just another Perl shrine

Re: parsing malformed CSV with per column quote chars

by dasgar (Curate)
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?

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

How do I use this? | Other CB clients
Other Users?
Others scrutinizing the Monastery: (2)
As of 2016-10-23 23:43 GMT
Find Nodes?
    Voting Booth?
    How many different varieties (color, size, etc) of socks do you have in your sock drawer?

    Results (302 votes). Check out past polls.