sub LetsRock { my (@kids); for (my $x=0; $x < 10; $x++) { my ($kid) = threads->create( \&ThreadFunc, 'https://www.wellsfargo.com'); if (defined($kid)) { push(@kids, $kid); } sleep(1); } WaitForThreads(@kids); } #### sub Thread { my ($function, @params) = @_; my ($thread); if (defined(&{$function})) { $thread = threads->create($function, @params); } return($thread); }