in reply to Regex, Newline, Wilcard

I prefer to write my regexes as restrictive as possible. Hence, something like (untested):
$file =~ m{<TABLE \s+ ([^>]*+)> ( [^<]*+ (?: < (?!/TABLE>) [^<]*+ )* ) </TABLE>}x;
This puts 'name="table1"' in $1 and the content of the table in $2. If the perl you're using is pre-5.10, or if you know your input is 'valid' (that is, each <TABLE> has a matching </TABLE>) use '*' instead of '*+'.