I'm upgrading a set of web pages to a new system, and I want to strip out and replace the boilerplate at the top of each page, and replace it with new boilerplate. Fortunately, each page has a content table, and no tables before it. I want to do something like:
$contents =~ s/^.*<table/$newHeader/
This only works for the first line of $contents. Is there a way to replace everything before (and including) the first <table in the file with my new boilerplate?