#!perl -slw use threads; sub t1 { eval{ use Math::GMP }; my $mbi = Math::GMP->new($_[0]); return $mbi; } my $th1 = threads->new(\&t1, '123' x 11); my $ret1 = $th1->join; print Math::GMP::get_str_gmp($ret1, 10);