$data = <<EOF;
<html>
<Head><title>intranet mycompany</title></head>
<body> 
<div>blah</div>

<p>
the text i need to extract <br>

<ul>
<li>stuff i don't want.</li>
<li>more stuff i don't want.</li>
</ul>

More text i need to exctract.
</p> 
</html>
</body>
EOF

$data =~ s/<ul>.*<\/ul>//sg;

print $data;