Beefy Boxes and Bandwidth Generously Provided by pair Networks
Don't ask to ask, just ask
 
PerlMonks  

Re^2: Convert hash to CSV using Text::CSV::Slurp

by Laurent_R (Canon)
on May 16, 2015 at 11:59 UTC ( [id://1126855]=note: print w/replies, xml ) Need Help??


in reply to Re: Convert hash to CSV using Text::CSV::Slurp
in thread Convert hash to CSV using Text::CSV::Slurp

Hmm, I am not sure of what you do then with your @row and @cols arrays to populate your CSV.

And what do you think will happen if you have other types of references (array refs, scalar refs, code refs, etc.) in your data structure? The program might probably not choke, but you'll see references (something like ARRAY(0x60005f6e0) in your output, instead of the actual data. Probably not what you want (although I am not entirely sure of what you want to obtain exactly).

Je suis Charlie.

Replies are listed 'Best First'.
Re^3: Convert hash to CSV using Text::CSV::Slurp
by Plankton (Vicar) on May 17, 2015 at 19:56 UTC
    print FH join( ',', @cols); print FH "\n"; print FH join( ',', @row); print FH "\n";
    And the developer of the API says I should always a expect HoH.

Log In?
Username:
Password:

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

How do I use this?Last hourOther CB clients
Other Users?
Others pondering the Monastery: (6)
As of 2024-03-28 14:05 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found