jaypee has asked for the wisdom of the Perl Monks concerning the following question:

Hi all, I'm pretty new to Apache::asp. I'm trying to figure out how to upload a file to a certain directory using $Request->FileUpload but I'm having troublw seeing how to properly do it throught the example posted on apache-asp.org. Any help would be appreciated.

Replies are listed 'Best First'.
Re: apache::asp
by cianoz (Friar) on Sep 19, 2000 at 21:32 UTC
    # my $fh = $Request->FileUpload('upload_file', 'FileHandle'); open DEST, ">/where/you/whant/to/write/it" ; # remember to handle errors... while(<$fh>) { print DEST $_; } close(DEST);

      Please use binmode($fh) when copying binary files. This will prevent your code from breaking under operating systems and programming languages that make a difference between text and binary files. Your code would scramble files under Windows.

        a bit pedantic? :-)