Beefy Boxes and Bandwidth Generously Provided by pair Networks
Just another Perl shrine

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 meditating upon the Monastery: (5)
As of 2015-11-30 04:52 GMT
Find Nodes?
    Voting Booth?

    What would be the most significant thing to happen if a rope (or wire) tied the Earth and the Moon together?

    Results (757 votes), past polls