#!/usr/bin/perl use strict; use warnings; use IPC::Open2; my $pid = open2(my $OUT, my $IN, "/bin/sed", "s/h/H/"); print $IN "hallo\n"; close $IN; print <$OUT>;