I have two files, xml and an html and need to extract data from these on certain patterns. my XML file is pretty well formatted and i can use getline to read a line and search data between tags.

if($line =~ /\$varvalue\</tag1>/)

However, for my HTML, it has one of the worst code i have scene and the file is like...


Code:
<div class="theater">
...