sub read { my $self = shift; $self->{real_filehandle}->read(@_); } #### 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