in reply to I've got a problem with the file upload code
If you're using Windows, you might try using binmode() on your file handle (as well as checking for whether the upload succeeded):
if (!defined($file_handle)) { ... handle it ... } $file_handle->binmode;
The reason you got an empty file when you did this: print OUTFILE $file_handle; is probably that $file_handle was undef. If it were a valid file handle, you'd have gotten something like "IO::File=GLOB(0x83b3ca4)" in your file (you can't print a file handle to another file and expect the file to get copied).
Also, if you're on Windows, make sure to binmode OUTFILE too.
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re: Re: I've got a problem with the file upload code
by Agermain (Scribe) on Jun 27, 2001 at 22:40 UTC | |
by bikeNomad (Priest) on Jun 28, 2001 at 01:16 UTC | |
by Agermain (Scribe) on Jun 28, 2001 at 21:56 UTC |