in reply to Re^2: Extraneous behaviour of match variablesin thread Extraneous behaviour of match variables
Better might be to use an HTML parser (or something like HTML::LinkExtor) and simplify what you have to look at.