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


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'