This is a little example of how to use threads in Perl. It creates three threads and runs them... That's it...
$i = 0;
foreach my $myThread(@threads)
my @ReturnData = $myTread->join ;
print "Thread $i returned: @ReturnData\n";
my ($threadID) = @_;
print "Thread ID: $threadID >> $_ >> GLB: $global\n";
return( $id );