my $out = new MyFileHandleWrapper; my $in = new MyFileHandleWrapper; pipe $out, $in or die; # Fork, close $in and read from $out in the parent, # print to $in in the child