in reply to Launching multiple programs from Perl script
exec($cmd1) if fork; exec($cmd2) if fork; exec($cmd3) if fork;
Also FYI, exec doesn't cause your script to "die"; it removes your script from the operating system's process table, replacing it with the executed command. Thus your script "becomes" the executed program.
perl -E'sub Monkey::do{say$_,for@_,do{($monkey=[caller(0)]->[3])=~s{::}{ }and$monkey}}"Monkey say"->Monkey::do'
|
---|
Replies are listed 'Best First'. | |
---|---|
Re^2: Launching multiple programs from Perl script
by mbethke (Hermit) on Nov 06, 2012 at 17:12 UTC | |
Re^2: Launching multiple programs from Perl script
by Shawrich (Initiate) on Nov 06, 2012 at 16:38 UTC | |
by mbethke (Hermit) on Nov 06, 2012 at 17:16 UTC |
In Section
Seekers of Perl Wisdom