in reply to backticks & job control

I'm a little confused... Your original "a.pl" program captures the output from your other script, and assigns it to $ret. If the other script were running in the background (so that "a.pl" continues to do other things at the same time), do you still need the output of that other script to be assigned to some variable in "a.pl"?

Maybe you've already figured that part out, but it wasn't clear from your post or other replies in the thread, and it would make a difference in terms of what a correct solution would look like.

Obviously, if you want output from the other script to be assigned to a variable in "a.pl", and you want the other script to run in the background, you have to save it's output to a file, have "a.pl" doing other stuff (possibly including "wait" or "waitpid") until the background job is done, then read the output file that it created. Or maybe you can find another technique in perlipc that would make more sense for you.