in reply to How to append record at the existing record ?
Generally if the file isn't too big just feed it into an array. Then append the array with your new info and print it out.
use strict; use warnings; open(FH,'<','input') or die "$!\n"; my @array = <FH>; close FH; push(@array,"Your new data\n"); open(OUT,'>','output') or die "$!\n"; print OUT @array;
Try reading: How (Not) To Ask A Question and I know what I mean. Why don't you?
| XP matters not. Look at me. Judge me by my XP, do you? |
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
| A reply falls below the community's threshold of quality. You may see it by logging in. |