in reply to child processes in fork

If you wish to gather its output and wait for the child there are two simple options. The first runs the child to completion then gets its output

perl -le '$result=`echo "hello world"`;print $result; print "OK"'
The second starts the child and reads its output line at a time untill it is done.
perl -le 'open CHLD, "ls -l |";while(<CHLD>){chomp; print "got: $_"} p +rint "OK"'

Cheers,
R.

Pereant, qui ante nos nostra dixerunt!