in reply to sending multiple commands

You could use "naked" fork for this, but it looks like Parallel::ForkManager would let you write the code pretty much the way you wrote it in your example.