I haven't use threads much in Perl, so please take my advice with a grain of salt. It looks like you're just joining with the last thread you created, when really you want to join with all of your threads. One way to do this would be to keep the threads in an array, then just join then sequentially when your main program is done:
our @threads;
...
if ($cnt >= $NumPerThread) {
my $thread = new Thread \&process, @group;
push(@threads,$thread);
undef @group;
undef $cnt;
}
...
foreach my $thread (@threads)
{
$thread->join;
}