@URLs = ("http://www.directhit.com/fcgi-bin/DirectHitWeb.fcg?service=web&type=srch&fmt=html&template=search&qry=%s", "http://www.directhit.com/fcgi-bin/DirectHitWeb.fcg?cmd=qry&qry=%s&base=10&pgsz=10&template=search", "http://www.directhit.com/fcgi-bin/DirectHitWeb.fcg?fmt=html&qry=%s&base=20&pgsz=10&template=search", "http://www.directhit.com/fcgi-bin/DirectHitWeb.fcg?fmt=html&qry=%s&base=30&pgsz=10&template=search", "http://www.directhit.com/fcgi-bin/DirectHitWeb.fcg?fmt=html&qry=%s&base=40&pgsz=10&template=search", "http://www.directhit.com/fcgi-bin/DirectHitWeb.fcg?fmt=html&qry=%s&base=50&pgsz=10&template=search", "http://www.directhit.com/fcgi-bin/DirectHitWeb.fcg?fmt=html&qry=%s&base=60&pgsz=10&template=search", "http://www.directhit.com/fcgi-bin/DirectHitWeb.fcg?fmt=html&qry=%s&base=70&pgsz=10&template=search", "http://www.directhit.com/fcgi-bin/DirectHitWeb.fcg?fmt=html&qry=%s&base=80&pgsz=10&template=search", "http://www.directhit.com/fcgi-bin/DirectHitWeb.fcg?fmt=html&qry=%s&base=90&pgsz=10&template=search"); 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; while($page =~ m!\.