use strict; use Net::SSLeay; # or whatever other SSL implementation you use use threads; my $t = threads->new(\&threadedRequestThread) or die "Can't create thread\n"; print "Joining thread\n"; my @ret = $t->join(); print "Thread returned (@ret)\n"; exit(0); # Actual Thread function sub threadedRequestThread { print "Inside threadedRequestThread\n"; return "A list of words"; }