## test.pl use threads; use Testit; my $argument=1; my $thread=threads->create( 'forthread', ($argument)); $thread->join(); exit(0); ## Testit.pm package Testit; require Exporter; our @ISA =qw(Exporter); our @EXPORT =qw(forthread); our @VERSION =1.0; sub forthread{ my ($arg)=@_; warn "$arg"; return 0; } 1;