in reply to How to call the subroutine from another perl module using threads

I am trying for thread programming perl in a following way

Don't use Thread anymore, use threads instead

Case2: calling the subroutine which exists in a different perl module my $t= Thread->new(\&$anotherfile->another_process, @args);

That has very little chance of being correct. What is the return value of $anotherfile->another_process?

I think you should read threads synopsis and Simple Module Tutorial and try maybe

threads->create{ sub { $object->method( @args ) }, ); threads->create{ sub { $object->method( @_ ) }, @args );
  • Comment on Re: How to call the subroutine from another perl module using threads
  • Download Code