in reply to Trying to delete text from a text file

Because you say that the phrase marking the "delete from" point is always the same, it might be more efficient to use substr and index instead of the regex solutions suggested by toolic and ww. I don't have time at the moment to benchmark though so you might want to run some comparisons for yourself.

use strict; use warnings; use 5.010; my $deleteFromPhrase = q{i want to start deleting here}; while ( <DATA> ) { say substr $_, 0, index $_, $deleteFromPhrase; } __END__ keep keep keepi want to start deleting here blah blah no change in this para but change this onei want to start deleting here burble and also change this parai want to start deleting here blarf

The output.

keep keep keep no change in this para but change this one and also change this para

I hope this is helpful.

Cheers,

JohnGG