my $q = new Thread::Queue; my $thr = threads->new(\&thr_func, $q); sub thr_func{ my ($queue) = @_; }