#usage googlestrip file:///C:/googlesearchresult.htm > urllist.txt #### my $fileget = getstore($url,"tempfile.html"); #### my $suffix = substr($element,$offset,$filetypelen); if ($suffix =~ m/$filetype/) { push @pdflist, $element; #### my @list = sort @pdflist; #### for my $url (@list) { next if ($url =~ m/\/s.*pdf/); print $url; print "\n"; } #### #!/usr/bin/perl use strict; use warnings; use LWP::Simple; use HTML::SimpleLinkExtor; die "Usage: $0 URL []\n" unless @ARGV >= 2; my $url=shift; my $wanted=join '|', map quotemeta, @ARGV; $wanted=qr/\.(?:$wanted)$/; defined(my $html=get $url) or die "Couldn't get <$url>\n"; { local $,="\n"; print sort grep /$wanted/, HTML::SimpleLinkExtor->new->parse($html)->a; } __END__