use HTML::LinkExtor; my $p = new HTML::LinkExtor( sub { print "@_\n" }, ); $p->parse( q{ }); __END__ a href SCOTCH img src PEANUTS