Clear questions and runnable code get the best and fastest answer |
|
PerlMonks |
Re: Search/Replace within fields of CSVby Tux (Canon) |
on May 08, 2015 at 18:55 UTC ( [id://1126146]=note: print w/replies, xml ) | Need Help?? |
I'd say add a header line and use DBD::CSV. Of course you can do it with Text::CSV or Text::CSV_XS. I'd use DBD::CSV if the dataset isn't too large (the whole set fits easily in memory). I'd use Text::CSV_XS' csv function with on_in that lets you change fields on the fly.
update: As of version 1.17, you can also use filter (if you prefer that):
Enjoy, Have FUN! H.Merijn
In Section
Seekers of Perl Wisdom
|
|