use strict; use warnings; use threads; for (my $i = 1; $i < 3; $i ++) { threads->create(\&abc)->detach(); } <>; sub abc { }