in reply to Regular Expression

You might simplify your task by slurping the whole file instead of parsing it one line at a time:
my $html = do {local $/;<FILE>};
Then you could use a regex like:
$html =~ s/<table[^>]+>.+<\/table>//s;
And that will work ... for a little while - nested tables will throw a monkey wrench into that regex. Your best bet is to RTFM and use a real HTML Parser.

jeffa

L-LL-L--L-LL-L--L-LL-L--
-R--R-RR-R--R-RR-R--R-RR
B--B--B--B--B--B--B--B--
H---H---H---H---H---H---
(the triplet paradiddle with high-hat)