#!/usr/bin/perl -w use strict; use warnings; my $cmd = "proc1.pl"; open(my $pipefh, "$cmd |") or die "Unable to pipe to command '$cmd' ($!)\n"; my $out; while ($out = <$pipefh>) { print $out; }