#!/usr/bin/perl -w use strict; use LWP::Simple; open ("output","> /output/results.txt") || die ("Could not open output file $!"); open ("input", "< /input/urllist.txt") || die ("Could not open input file $!"); $/=undef; my $urllist=; while($urllist =~ m{(http://.+\.html)}g){ my $url=$1; my $html=''; $html = get("$url") or print "Couldn't fetch $url."; while($html=~ m{(find whatever I want)}gi){ $mysearch=$1; print output "$url|$mysearch\n";} } } close ("output"); close ("input");