... my $fh = $fs->open_write( $path ); # Filesys::Virtual::Plain if( $fh ){ if($ENV{STDIN_WAITING}){ File::Copy::copy(\*STDIN,$fh); # rely on File::Copy's robust buffered GLOB to HANDLE copy }else{ print $fh $self->query->param('PUTDATA'); } $fs->close_write($fh); return 1; }else{ $fs->close_write($fh); return 0; }