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
Replies are listed 'Best First'.
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 meditating upon the Monastery: (3)
As of 2015-09-01 01:56 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    The oldest computer book still on my shelves (or on my digital media) is ...













    Results (366 votes), past polls