in reply to CGI upload and IIS 5
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:if(open FILE, ">c:\\temp\\$filename") { ...
It also wouldn't hurt to die if $filename is undefined:use File::Basename; my $full_path = $request->upload($filename); my $filename = fileparse($full_path);
Hope this helps - UPDATE: in retrospect, I would follow thpfft's advice, take another approach.my $filename = fileparse($full_path); die "couldn't parse the file name" unless $filename;
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 |