Beefy Boxes and Bandwidth Generously Provided by pair Networks
Perl: the Markov chain saw
 
PerlMonks  

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.

--marmot


Comment on Re: CSV Manipulation

Log In?
Username:
Password:

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

How do I use this? | Other CB clients
Other Users?
Others about the Monastery: (6)
As of 2014-08-28 23:38 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    The best computer themed movie is:











    Results (275 votes), past polls