in reply to Re: Re: Uploading Files (Win32)
in thread Uploading Files (Win32)

Is this problem something to do with paths and forward and back slashes?

Almost certainly.

Use the full path.

Use forward slashes / There is NO need to use backward slashes ever under Windows unless you specifically want to work through the cmd.exe or command.com shells (you don't).

Your current working directory os almost certainly NOT what you think it is which is probably causing the problem.

You don't show how you are opening the external file for writing. Try something like (untested):

my $dir = 'C:/temp/web'; # or something like that my $localfile = "$dir/$filename"; open OUT, ">", $localfile or die "Cannot open $localfile for writing:$ +!\n";
--
Regards,
Helgi Briem
helgi AT decode DOT is

Replies are listed 'Best First'.
Re: Re: Re: Re: Uploading Files (Win32)
by Anonymous Monk on Feb 06, 2003 at 17:55 UTC

    Helgi

    Thanks for the response(s) - I appreciate you taking the time to help a novice

    The following lines of code better illustrate the problem:

    my $input_filehandle = upload( 'UPLOADFILE' ); sysopen(IN, $input_filehandle, O_RDONLY) || Error ('open','file'); sub Error { print "The server can't $_[0] the $_[1]: $! \n"; exit; }

    The above code returns the following error:

    "The server can't open the file: No such file or directory"

    Which (I think) means the program can't find the local file for reading?

    I'll use the code you posted to try and debug a little further!

    Thanks

    Eoin