in reply to Modifying a file

Read perlintro then post some code that you have tried with a small sample (a few lines) of your input file. Then, try to describe in more detail what problem you are having.