my ($url, $current_depth, $file) = @_; my ($obj_spider, $html, @links, $link, $tid); $obj_spider = Spider::Easyspider->new($config); $html = $obj_spider->http_get($url); @links = $obj_spider->get_links($html); open(LINKS, ">>$file") or die "&CLIENT_get_links_threads: Cannot open $file to add links: $!\n"; flock(LINKS,LOCK_EX); foreach $link (@links) { print LINKS "$current_depth $link\n"; } close LINKS or warn "&CLIENT_get_links_threads: Cannot close $file: $!\n"; flock(LINKS,LOCK_UN); # speicher freigeben undef $obj_spider; undef @links; undef $html; return 1; } # sub CLIENT_get_links_threads {}