http://www.perlmonks.org?node_id=1206538


in reply to Parallel trigger of different subs

Simples:

#!perl -slw use strict; use threads; sub one { select('','','',rand(0.01)), print 'one' while 1; } sub two { select('','','',rand(0.01)), print 'two' while 2; } async \&one; two;

Doing something useful with it requires a little more thought.


With the rise and rise of 'Social' network sites: 'Computers are making people easier to use everyday'
Examine what is said, not who speaks -- Silence betokens consent -- Love the truth but pardon error.
"Science is about questioning the status quo. Questioning authority". The enemy of (IT) success is complexity.
In the absence of evidence, opinion is indistinguishable from prejudice. Suck that fhit