#! /usr/bin/perl use strict; use warnings; my $pid = open(my $fh,"programm |") or die $!; print $pid,"\n"; while(<$fh>){ print; } close $fh;