#!/usr/bin/perl my $rcmd = "./rcmd.pl"; if (open my $cmdh, "$rcmd |") { print <$cmdh>; }