Beefy Boxes and Bandwidth Generously Provided by pair Networks
Think about Loose Coupling

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 about the Monastery: (6)
As of 2016-02-12 23:44 GMT
Find Nodes?
    Voting Booth?

    How many photographs, souvenirs, artworks, trophies or other decorative objects are displayed in your home?

    Results (415 votes), past polls