Beefy Boxes and Bandwidth Generously Provided by pair Networks
Welcome to the Monastery
 
PerlMonks  

Re^2: adding database values to csv file

by Anonymous Monk
on Sep 27, 2011 at 11:52 UTC ( #928071=note: print w/ replies, xml ) Need Help??


in reply to Re: adding database values to csv file
in thread adding database values to csv file

Hello,
I would like to tie on with my question:
say you need to modify the values bevor printing where could be the best point to do this?
Thank!
VE


Comment on Re^2: adding database values to csv file
Re^3: adding database values to csv file
by Tux (Monsignor) on Sep 27, 2011 at 17:38 UTC
    while ($sth->fetch) { $rec{fobar} =~ s{old}{new}; # change in a single co +lumn s/(?:\b|[0-9])USD\b/EUR/g for values %rec; # change all columns $csv->print (*STDOUT, [ @rec{@fld} ]); }

    Enjoy, Have FUN! H.Merijn
      Many thanks!

      VE

Log In?
Username:
Password:

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

How do I use this? | Other CB clients
Other Users?
Others chilling in the Monastery: (5)
As of 2014-12-28 08:55 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    Is guessing a good strategy for surviving in the IT business?





    Results (179 votes), past polls