in reply to Re^3: getting a child's process ID
in thread getting a child's process ID

If you don't want Perl to insert a shell between your program and the child process, then you'll have to filter out all the redirection etc. yourself.

The alternative is to restructure your process in such a way that it always expects two processes.

As you haven't told us much about your problem, I can't really help you here. Maybe you want to post a new thread via SoPW where you describe the actual problem you're trying to solve. Then maybe somebody can propose alternatives that allow you to accomplish your goal.