#! /usr/bin/perl use strict; use warnings; use threads; print "threads: ", $threads::VERSION; print "perl: ", $]; my @child; my @list = 1 .. 100; while (1) { my @child = map threads->create("test","$_"), @list; $_->join for @child; } sub test { my ($item) = @_; }