Beefy Boxes and Bandwidth Generously Provided by pair Networks
Syntactic Confectionery Delight

Re: CSV Manipulation

by furry_marmot (Pilgrim)
on Nov 16, 2011 at 19:17 UTC ( #938443=note: print w/ replies, xml ) Need Help??

in reply to CSV Manipulation

If you're just processing each line separately, I would think the easiest way, especially for large files, would be

  1. open the first file
  2. open an output file
  3. then read a line from the first file,
  4. process the line, including converting to fields or editing the fields in place
  5. write the line to the new file.

If no errors, the new file contains all the processed data.

Text::CSV shows an example of testing a field in place right at the top of the perldoc. It's also the best tool for CSV files.


Comment on Re: CSV Manipulation

Log In?

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

How do I use this? | Other CB clients
Other Users?
Others drinking their drinks and smoking their pipes about the Monastery: (6)
As of 2015-07-31 05:24 GMT
Find Nodes?
    Voting Booth?

    The top three priorities of my open tasks are (in descending order of likelihood to be worked on) ...

    Results (274 votes), past polls