#!/usr/bin/perl use warnings; use strict; use threads; sub Function_1 { my $up_bound1 = shift; my $total_f1; foreach my $in (0..$up_bound1) { $total_f1 += $in/3; } return $total_f1; } sub Function_2 { my $up_bound2 = shift; my $total_f2; foreach my $in (0 .. $up_bound2) { $total_f2 += $in; } return $total_f2; } my $up_bound = 10; my $t = threads->new( \&Function_1, $up_bound ); my $sum = Function_2( $up_bound ) + $t->join; print "The total is $sum"; __END__ c:\Perl\test>junk6 The total is 73.3333333333333