Let me see if I have this right. You're running your script on a desktop machine. You want it saved on a remote machine. You're not getting it saved there.
First tip. Follow the suggestions in perlstyle and have warnings on your open. Many things can go wrong, and the error messages will help you figure out which.
Secondly to solve your problem you need to have a way to directly access the filesystem. At a guess from the path you tried, the client is a Windows machine. In that case try to locate the network share then proper full path and open that directly. (Note, you need the path as it looks from the client machine, not as it looks from the webserver.) Be aware that you have to switch \ to /, or else double your \ in your strings.
There are many reasons why that might fail, including permissions on the webserver. In that case you need to talk with a sysadmin and get some other networking solution set up. One is to have an ftp server. Another is that if this is for a local workgroup, you could put the file in a shared directory (using the appropriate smb path) and then have a file:/// URL in the webserver. Another is to have a CGI program on the webserver that can accept a file upload and write it directly to the webserver.
Good luck. Often the solution to this kind of problem tends to be fairly simple, but finding the missing piece of information that makes it simple (eg the right way to name the remote directory) can be very frustrating... |