in reply to Parsing a large html with perl
Just don't use a regex for HTML parsing. See Why a regex *really* isn't good enough for HTML and XML, even for "simple" tasks
Greetings,-jo