in reply to Deleting everything before a string

Instead of adding extra stuff and then erasing it, you could just as well do:
while (<MYFILE> ) { $content .= $_ if /start-string/ .. /end-string/ }