From: Tony S. <tsh...@ma...> - 2002-12-03 14:59:13
|
> my $q = new CGI; > > my $file = $q->param("file") || &error( "No File received!"); I know it shouldn't matter, but it seems to be a bad idea to name a variable and a file handle the same...IMHO. Could cause confusion. I would do an open as binary here, otherwise the output will always be ascii (I think...would have to go back and do some reading on that). > open(OUTPUT, ">$full_filename"); > while (read( $fh, $buffer, 512000) ){ print OUTPUT $buffer;} > close (OUTPUT); > |