in reply to running a program

If your operating system allows it, you can do a fork:
if ($pid = fork); # this is the parent, the script that keeps running; } else { exec "any_program_you_like"; # this is the child which will be replaced with # the other command }