http://www.perlmonks.org?node_id=1047173


in reply to How to read a file and add value for same key

Hi tony_ucdavis,

I only recently started with Perl myself. The tutorials section has a lot of really good information on how to start writing scripts and programs. Also, see if you can find a copy of the book 'Learning Perl', I have found it very useful.

You'll want to use the open function to open the file, a while loop to read the data in, and the print function to write everything out. If you want to store the data first, you can use a hash.

  • Comment on Re: How to read a file and add value for same key