Beefy Boxes and Bandwidth Generously Provided by pair Networks
Pathologically Eclectic Rubbish Lister
 
PerlMonks  

Re: Low-threshold function in Text::CSV_XS

by moritz (Cardinal)
on Jan 24, 2014 at 20:57 UTC ( [id://1071997]=note: print w/replies, xml ) Need Help??


in reply to Low-threshold function in Text::CSV_XS

Some assorted, unorganized feedback follows:

I'm all for a versatile, easy-to-use function. But please don't call it csv2list when it doesn't actually return a list.

There's already enough array vs. list confusion without you contributing even more to it :-).

csv2array is only slightly longer.

It would be really awesome if there would be corresponding array2csv function that accepts mostly the same arguments, and round-trip the data back to original CSV (or as close as possible).

I would also love to have an option to have the first row treated as table headers (and thust column names for the hash variant), which would also imply that there must be some option to force the return format that isn't passing in a headers array reference.

Replies are listed 'Best First'.
Re^2: Low-threshold function in Text::CSV_XS
by Tux (Canon) on Jan 24, 2014 at 21:16 UTC

    I am already converted to csv. I like your quest for the reverse trip. I have to ponder a bit if it can use the same function or if there really need to be two.

    headers => "auto" is exactly what you ask for in the last paragraph.


    Enjoy, Have FUN! H.Merijn

Log In?
Username:
Password:

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

How do I use this?Last hourOther CB clients
Other Users?
Others chilling in the Monastery: (3)
As of 2024-04-25 17:21 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found