use strict; use warnings; use URI::Find; my @found; # this is just for this example, your $page will have the HTML # this line slurps the DATA filehandle below into a scalar my $page = do {local $/;}; my $finder = URI::Find->new( sub { push @found,shift } ); $finder->find(\$page); print $_,$/ for @found; __DATA__ stuff click don't feed the trolls #### repeat: don't feed the trolls don't feed the trolls don't feed the trolls don't feed the trolls don't feed the trolls don't feed the trolls don't feed the trolls don't feed the trolls don't feed the trolls don't feed the trolls don't feed the trolls don't feed the trolls don't feed the trolls don't feed the trolls don't feed the trolls don't feed the trolls don't feed the trolls don't feed the trolls don't feed the trolls don't feed the trolls don't feed the trolls don't feed the trolls don't feed the trolls don't feed the trolls don't feed the trolls don't feed the trolls don't feed the trolls don't feed the trolls don't feed the trolls don't feed the trolls don't feed the trolls don't feed the trolls don't feed the trolls don't feed the trolls don't feed the trolls don't feed the trolls don't feed the trolls don't feed the trolls don't feed the trolls don't feed the trolls don't feed the trolls don't feed the trolls