Hello Anonymous Monk,
In reply to your merged thread Running 2 different subs simultaneously. I am not sure exactly why the replies of the fellow Monks did not cover your question but maybe the use of Parallel::Simple a really simple module in parallel processes will help you to understand that your question is answered already.
Sample of code:
#!/usr/bin/perl use strict; use warnings; use feature 'say'; use Parallel::Simple qw(prun); sub myFooSub { say "$$ foo 'clear bgp'"; } sub myBarSub { say "$$ bar 'clear ospf'"; } # style 2: named code blocks (like the Benchmark module) prun( foo => \&myFooSub, bar => \&myBarSub, ) or die( Parallel::Simple::errplus() ); __END__ $ perl test.pl 21120 foo 'clear bgp' 21121 bar 'clear ospf'
Hope this helps, BR.
In reply to Re: Parallel trigger of different subs
by thanos1983
in thread Parallel trigger of different subs
by Anonymous Monk
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |