Anonymous Monk has asked for the wisdom of the Perl Monks concerning the following question:
#!/local/bin/perl use CGI; my $cgi = new CGI; my $file = $cgi->param('uploadfile'); $file=~m/^.*(\\|\/)(.*)/; # strip the remote path and keep the fil +ename my $name = $2; open(LOCAL, ">$name") or die $!; while(<$file>) { print LOCAL $_; } print $cgi->header(); print "$file has been successfully uploaded... thank you.\n";
The problem I'm having is that when the local file on the WinXP client is written to the server it is always 0 (zero) length i.e. the filename gets created but no data gets written to the remote file. I've tried a similiar script from the PERL Cookbook using sysopen and I get the same result.
Not sure what's going on but any help/advice would be much appreciated.
Thanks
Eoin
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re: Uploading Files (Win32)
by helgi (Hermit) on Feb 06, 2003 at 14:13 UTC | |
by Anonymous Monk on Feb 06, 2003 at 15:21 UTC | |
by helgi (Hermit) on Feb 06, 2003 at 16:24 UTC | |
by Anonymous Monk on Feb 06, 2003 at 17:55 UTC | |
|
Re: Uploading Files (Win32)
by Heidegger (Hermit) on Feb 06, 2003 at 15:38 UTC | |
|
Re: Uploading Files (Win32)
by Heidegger (Hermit) on Feb 06, 2003 at 16:28 UTC | |
by Anonymous Monk on Feb 06, 2003 at 17:37 UTC | |
by jasonk (Parson) on Feb 06, 2003 at 18:59 UTC | |
by Anonymous Monk on Feb 07, 2003 at 22:33 UTC |