my($app1_pid,$app1_out)=pipeline(STDIN,'app1',$URL); my($app2_pid,$app2_out)=pipeline($app1_out,'app2'); while (<$app2_out>) { ... }