Also known as...
The Wrong Way:
use CGI qw/:standard/;
my $fh = upload('uploaded_file');
die "No filehandle!" unless $fh;
open (OUT,">C:/Temporary/upload.txt") || die "Cannot open: $!";
while (<$fh>) {
print OUT;
}
close OUT; |
The Right Way:
use CGI qw/:standard/;
my $fh = upload('uploaded_file');
die "No filehandle!" unless $fh;
open (OUT,">C:/Temporary/upload.txt") || die "Cannot open: $!";
binmode OUT;
while (<$fh>) {
print OUT;
}
close OUT; |
|
| Contents | Next |