#!/usr/bin/perl use strict; use warnings; $| = 1; open my $read, 'test.pl |'; while ( my $line = <$read> ){ print $line; }