Im looking for a threading (Threads) and/or (Thread:queue) Equivalent to my script that Basically this just runs through a list with different threads each thread doing a different variable from the array Example Below
use Parallel::ForkManager; my $max_processes = '10'; my $pm = Parallel::ForkManager->new($max_processes); my $array = 'list.txt'; open my $handle, '<', $array; chomp(my @array = <$handle>); close $handle; for my $printme (@array) { my $pid = $pm->start and next; print $printme; $pm->finish; } $pm->wait_all_children;
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |