} elsif ($follow_flag == "1"){ print "[$i] Scanning $tmp_url\n"; if ($thread_count < $thread_max) { push @threads, threads->new(\&CLIENT_get_links_threads, $tmp_url, $i, "threads_links.txt"); $thread_count++; } elsif ($thread_count == $thread_max){ print "\n&linktiefe_scanner_threads(): Max Threads reached: joining them!\n\n" if ($debug == "1"); foreach (@threads) { eval { $_->join; } && warn $@ if $@; }; $thread_count = "0"; } elsif ($#working_links == $link_count) { print "\n&linktiefe_scanner_threads(): Last Link in Array - Threads: joining them!\n\n" if ($debug == "1"); foreach (@threads) { eval { $_->join; } && warn $@ if $@; }; } # ... # here do something with the links (spider / mirror ) # ... } else {