$q = CGI::new(); my $filename = $q->param('docname'); binmode($filename); if (open(OUTPUT, ">$output") || openError ()) { $Data = read( $filename, $buffer, BUFFER_SIZE ); }