more useful options | |
PerlMonks |
Re: Edit huge fileby pvaldes (Chaplain) |
on Jun 19, 2013 at 22:34 UTC ( [id://1039858]=note: print w/replies, xml ) | Need Help?? |
I am needed to edit a large, 500+ megabyte file in Perl, to remove one line near the beginning of the file, and one near the end (... This problem reminds me to head and tail programs...) you could use head to obtain the line, read to pick up just the first X characters of a file and then overwrite this line, maybe using also seek. Just some untested ideas...
In Section
Seekers of Perl Wisdom
|
|