sub grab_uri{ my @uris; my $finder = URI::Find->new(sub { my($uri, $orig_uri) = @_; push @uris, $uri; $uri }); $finder->find(\$d); \@uris; }