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

Re^2: Using Tie::IxHash to keep database query keys/values in order

by bradcathey (Prior)
on Feb 16, 2017 at 13:30 UTC ( #1182140=note: print w/replies, xml ) Need Help??


in reply to Re: Using Tie::IxHash to keep database query keys/values in order
in thread Using Tie::IxHash to keep database query keys/values in order

Yes, I'm building a CSV file, but thanks to the comments above, I'm thinking of 1) writing my own loop, or 2) using Excel::Template. Funny how we get myopic and miss the forest.

—Brad
"The important work of moving the world forward does not wait to be done by perfect men." George Eliot
  • Comment on Re^2: Using Tie::IxHash to keep database query keys/values in order

Replies are listed 'Best First'.
Re^3: Using Tie::IxHash to keep database query keys/values in order
by haukex (Bishop) on Feb 16, 2017 at 13:50 UTC

    Hi bradcathey,

    I'm building a CSV file

    If you use selectall_arrayref, that'll pull all the results from the database into memory. I imagine that fetching the results row by row with DBI's fetchrow_arrayref, the return value of which can be fed directly into Text::CSV's print method, would be more efficient.

    Regards,
    -- Hauke D

Log In?
Username:
Password:

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

How do I use this? | Other CB clients
Other Users?
Others browsing the Monastery: (6)
As of 2020-09-28 23:17 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?
    If at first I donít succeed, I Ö










    Results (144 votes). Check out past polls.

    Notices?