Hello All,
Well the query i am about to ask may seem amatuerish, but i am asking it newayz...
hope u gurus might not mind me asking such a thing ....
I had the following code :-
use threads;
$thr = threads->new(\&sub1);
sub sub1
{
print "Inside the thread\n ";
}
{
print "Inside the thread\n ";
}
O/p comes:-
A thread exited while 2 other threads were still running.
I am using Perl 5.8.0 on Win XP.
Plz note:- The content in the subroutine is not printed. I read it somewhere that we need to pass the reference of the subroutine to the new() method. But on doing so, the print statement in the subroutine is not getting executed.
So i removed the reference and made the statement as:-
$thr = threads->new(&sub1);
O/p
comes:-
Inside the thread
A thread exited while 2 other threads were still running.
Here the print statement inside the subroutine sub1 gets executed. Which of these is the correct syntax??
But here I am not passing the reference of the subroutine ... Can any of u masters help me understand this?? Sorry, if the query is a stupid one, but i really can't make sense of it.
Even if someone canguide/advise me to look at any documentation i shld refer to ... would be great help ...
Hoping u will kindly oblige ...
Thanks and Regards,
Ukhas Jean.
Do you Yahoo!?
Next-gen email? Have it all with the all-new Yahoo! Mail Beta.
_______________________________________________ ActivePerl mailing list [email protected] To unsubscribe: http://listserv.ActiveState.com/mailman/mysubs
