Just another Perl shrine | |
PerlMonks |
Re: Best way to edit a file?by MaxKlokan (Monk) |
on Apr 02, 2007 at 08:50 UTC ( [id://607781]=note: print w/replies, xml ) | Need Help?? |
Tie::File might help here. From the docs:
Tie::File represents a regular text file as a Perl array. Each element in the array corresponds to a record in the file. The first line of the file is element 0 of the array; the second line is element 1, and so on. The file is not loaded into memory, so this will work even for gigantic files. Changes to the array are reflected in the file immediately.Cheers, Max
In Section
Seekers of Perl Wisdom
|
|