Re: I have problems with download scripts, it's trying to print instead of saving the file




<michaelpgee@xxxxxxxxx> wrote in message
news:1128038037.277262.305710@xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx
> You should always check the return value of open(). Try:
>
> open(UPLOADFILE, ">$upload_dir/$filename")
> or die "Can't write to '$upload_dir/$filename': $!\n";
>
> I bet the webserver is running as a user that doesn't have permission
> to write to the specified directory.
>

What code should I use it I want the script to email someone about the
upload ?

here's the idea :

print { $filename was uploaded | mail -s $filename henry }

Thanks?


.