I\'m looking for a way to search and replace over multiple lines through a shell script. This is what I\'m trying to do:
source:
[stuff before]
');
$endPattern = quotemeta('');
$pattern = $startPattern . '.+' . $endPattern;
$s =~ s/$pattern/$newtext/sg;
print $s;