in reply to deleting content

You've posted at least six similar questions over the past few days. The highest-ranked response to your first question recommended using the HTML::TokeParser module on the CPAN.

Other monks told you that using a regex is tricky.

I think you've demonstrated that by now.

Additionally, I see that good advice about style and such has been largely neglected. Replies to this thread question your additional code. Other monks besides myself gave you code that didn't blindly copying variables back and forth, only to throw away their contents.

If you've ignored the advice so far, why should anyone bother explaining anything else?

There's no shame in being a new programmer. There's no shame in not understanding something.

There should be more shame for repeatedly asking the same question then ignoring the answer.