use LWP::Simple; open PAPERS, "papers.txt"; while () { $page = $_; $html = get $page or next; while ($html =~ s/(.*?)## while () { $page = $_; $html = get $page or next; my $path = $_; $path =~ s#^(.*)/.*?$#$1#; while ($html =~ s/(.*?)