in reply to Retrieving Links from a HTML Page

sub callback { my($tag, %attr) = @_; return if $tag ne 'a href '; # we only look closer at <img ...> push(@imgs, values %attr); }
This makes no sense whatsoever. You're including an attribute in a tag, and also tacking on some trailing spaces, and your comment indicates you want to look at images, but that doesn't jive with the comparison you're making.

In fact, on closer review, this seems to be one of the examples from Link::Extor's POD. You might have more luck adapting the code from the synopsis, which prints out the links.