#!perl use strict; use warnings; use IO::Pipe; my $pipe = IO::Pipe->new(); $pipe->reader(qw(ls -l)); while(<$pipe>) { ... }