Re: Problem with While condition in file upload

2003-02-10 Thread Rob Dixon
John W. Krahn wrote: > Rob Dixon wrote: >> >> Mike Garner wrote: >>> >>> if ($file) { >>> my @fileparts=split(/\\/,$file); >>> my $file_name=pop(@fileparts); >> >> my $file_name = (split '\', $file)[-1]; > ^^^ > That won't work because you are escaping the final

Re: Problem with While condition in file upload

2003-02-10 Thread John W. Krahn
Rob Dixon wrote: > > Mike Garner wrote: > > > > if ($file) { > > my @fileparts=split(/\\/,$file); > > my $file_name=pop(@fileparts); > > my $file_name = (split '\', $file)[-1]; ^^^ That won't work because you are escaping the final quote. Mike's regex is corr

Re: Problem with While condition in file upload

2003-02-10 Thread Rob Dixon
Hi Mike. Mike Garner wrote: > Hello all- > I'm trying to write a script that will upload a file from a web page > and store that file on the web server. I've snipped out the piece of > code below that's supposed to do this for me. This is running under > use CGI ':standard'; use strict; and use w

Problem with While condition in file upload

2003-02-09 Thread Mike Garner
Hello all- I'm trying to write a script that will upload a file from a web page and store that file on the web server. I've snipped out the piece of code below that's supposed to do this for me. This is running under use CGI ':standard'; use strict; and use warnings without any errors. # $file