in reply to pull the title content

I'm guessing this is a one-time fix kind of a thing, right? Normally, I'd suggest properly parsing any HTML but you might get by on the cheap.

perl -i.bak -0ple 's!<title>\s*</title>(.*?)(<title>.*?</title>)!$2$1$ +2!is' file.html

This comes with caveats, YMMV, etc... the regex is brittle... but it might do what you need. If this is something that you'll have to do over and over, though, I'd really suggest you take a more robust approach. See HTML::Parser for starters.

-sauoq
"My two cents aren't worth a dime.";