in reply to CGI upload and IIS 5

Don't forget to use > to write or >> to append:
if(open FILE, ">c:\\temp\\$filename") { ...
Also, if you just want to get the name of the file from $filename, then use File::Basename, it comes with the standard perl distribution:
use File::Basename; my $full_path = $request->upload($filename); my $filename = fileparse($full_path);
It also wouldn't hurt to die if $filename is undefined:
my $filename = fileparse($full_path); die "couldn't parse the file name" unless $filename;
Hope this helps - UPDATE: in retrospect, I would follow thpfft's advice, take another approach.

Jeff

R-R-R--R-R-R--R-R-R--R-R-R--R-R-R--
L-L--L-L--L-L--L-L--L-L--L-L--L-L--

Replies are listed 'Best First'.
Re: (jeffa) Re: CGI upload and IIS 5
by RatArsed (Monk) on Jun 05, 2001 at 18:31 UTC
    fileparse would tidy up my cack regexp to do effectively the same thing, but I do already cover my back for checking that a filename was specified...