in reply to Re: How to get child pid from backtics
in thread How to get child pid from backtics

No, it's not the pid of the subshell, because there isn't a subshell. Perl only calls a subshell if the command to call contains characters that are special to the shell (except whitespace) - otherwise Perl will split given string on whitespace, and execute the command (with any arguments) directly. In this case, perl will do an execv of ls, passing it -l as its sole argument.

Had you written:

$pid = open(my $proc, "-","ls -l>/tmp/foo");
then $pid would contain the pid of a shell.