in reply to from pseudofork to threads

If you want it to be similar to your fork version, you don't want to detach, as a detached thread is no longer joinable.

You want to do something like this:
use threads; use strict; use constant NUMBER_OF_THREAD => 10; $|++; sub thread_job { print "I am a child, this is the name my parents gave me: ", shift +(), "\n"; } my @kids; for (1..NUMBER_OF_THREAD) { push @kids, threads->create(\&thread_job, $_); } foreach my $kid (@kids) { $kid->join(); } print "The family reunioned!";