I think others have answered your initial question I'd just like to add since it looks like you're trying to parse through some HTML its far easier (and more accurate) to use an HTML parser module instead.
HTML::TokeParser is my favorite for general parsing
In reply to Re: help needed with match multiple lines
by cfreak
in thread help needed with match multiple lines
by Anonymous Monk
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |