Thanks for the code. But, for the given HTML:
my $html = <<'__HTML__';
<a href="http://www.yahoo.com" target=_blank><img
src="http://us.i1.yimg.com/nw.gif"
alt="Open this result in new window">ANCHOR TEXT MATCH</a>
<a href="http://www.yahoo.com" target=_blank><img
src="http://us.i1.yimg.com/nw.gif"
alt="Two clues"><img
src="http://us.i1.yimg.com/nw.gif"
alt="for the price of one"></a>
__HTML__
Desired result for http://www.yahoo.com as target url is:
http://www.yahoo.com
ANCHOR TEXT MATCH
http://www.yahoo.com
IMAGE (indicating there is no anchor text but there is an <img> tag within anchor tag)
Thanks,
|