Hello everyone. Does anyone know if there is a way to start a child process from within a script, then capture the child's standard output and exit code? From looking at the docs it seems that

$status = system("command");

lets you capture the exit code but not STDOUT. While

$output = `command`;

gives you the STDOUT but not exit status. Any help appriciated.

Steven.

do you mean

echo $?
commented: Good information +1

Yes. I have checked out the Perl documentation and that's just the job. Thanks.

Steven.

Be a part of the DaniWeb community

We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.