@URLs = ("http://www.lycos.com/srch/?lpv=1&loc=searchhp&query=%s", "http://www.lycos.com/srch/more.html?lpv=1&type=websites&loc=mlink_w&l=4&y=47238&c=301&o=7&s=47550&pn=&qc=&page=1&query=%s&first=11", "http://www.lycos.com/srch/more.html?lpv=1&type=websites&loc=next_websites&l=4&y=47238&c=301&o=7&s=47550&pn=&qc=&page=2&query=%s&first=21", "http://www.lycos.com/srch/more.html?lpv=1&type=websites&loc=next_websites&l=4&y=47238&c=301&o=7&s=47550&pn=&qc=&page=3&query=%s&first=31", "http://www.lycos.com/srch/more.html?lpv=1&type=websites&loc=next_websites&l=4&y=47238&c=301&o=7&s=47550&pn=&qc=&page=4&query=%s&first=41", "http://www.lycos.com/srch/more.html?lpv=1&type=websites&loc=next_websites&l=4&y=47238&c=301&o=7&s=47550&pn=&qc=&page=5&query=%s&first=51", "http://www.lycos.com/srch/more.html?lpv=1&type=websites&loc=next_websites&l=4&y=47238&c=301&o=7&s=47550&pn=&qc=&page=6&query=%s&first=61", "http://www.lycos.com/srch/more.html?lpv=1&type=websites&loc=next_websites&l=4&y=47238&c=301&o=7&s=47550&pn=&qc=&page=7&query=%s&first=71", "http://www.lycos.com/srch/more.html?lpv=1&type=websites&loc=next_websites&l=4&y=47238&c=301&o=7&s=47550&pn=&qc=&page=8&query=%s&first=81", "http://www.lycos.com/srch/more.html?lpv=1&type=websites&loc=next_websites&l=4&y=47238&c=301&o=7&s=47550&pn=&qc=&page=9&query=%s&first=91"); sub getpage { my($page, $search) = @_; $page--; return $SearchStat::E_RANGE if($page<0 || $page>$#URLs); $url = sprintf($URLs[$page], $search); $page = &fetch($url); return $SearchStat::E_NOTFOUND if $page == $SearchStat::E_NOTFOUND; @urls = (); return E_RANGE if $page =~ m!Sorry no matches were found containing .*!is; $page =~ s|.*?||is; while($page =~ m!