| Module Info
| Add a review of Tie-Handle-CSV
I tried a few modules to parse CSV files, i.e.
Text::CSV || Text::CSV_XS , Parse::CSV - I found that Tie::CSV::Handle is by far the most intuitive way to parse CSV files - I really like the interface and use it for a lot of simple tasks.
thanks for this module - it made my life a way easier ...
This is a very elegant solution to the problem of CSV file modifications, particularly if you want to work with your CSV line by line rather than parsing a whole file. If you need to read CSV, modify it, then spit it back out as CSV, this module will work nicely. Unfortunately, some of the magic behind the scenes is barely documented. The result of reading a CSV line through this tied handle is a tied array or hash reference that stringifies back to CSV when printed. That's implied in the docs, but not really spelled out and some usage examples would make it much easier. (E.g., to print out only certain fields, you really need to do a hash/array slice and store it back in the same tied object.) I spent longer digging through docs than actually writing code to use it. That said it's still good to have in the toolbox.