http://qs1969.pair.com?node_id=1039674

AI Cowboy has asked for the wisdom of the Perl Monks concerning the following question:

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. I need to do this for many many files, so performance and speed are a slight issue; reading every file and editing/reprinting them out could take days.

How can I find two lines of the file, remove them, without reading the entire file and taking a huge amount of time?