use HTML::Parser; my $p = HTML::Parser->new( api_version => 3 ); $p->handler( start => sub { printshift->{href} if shift eq 'a' }, 'tagname,attr' ); local $/; $p->parse(<>); #Just another URI finder