if ($req) { # if $base is undef here, the return value is effectively # just a copy of $self->request->uri. return $HTTP::URI_CLASS->new_abs($base, $req->uri); } #### my $url_name; my $base_url = "http://www.perlmonks.com/"; for (my $c = 0; $c<=$rowcount; $c++) { $webcrawler->get($url_name); my @links = map { $_->[0] } $webcrawler->links; # get Links my $ext1 = ".pdf"; my $ext2 = ".doc"; my $ext3 = ".ps"; my $ext4 = ".txt"; @links = map { URI->new_abs( $_, $base_url ) } @links; @links = map { /^$base_url/ ? $_ : () } @links; @links = grep(!/$ext1|$ext2|$ext4|$ext3$/, @links);