> I am looking at using the the Upload example (found on the embperl site)
but
> am a little lost.
>
> The example has the file that is being uploaded saved to the server as
> file.$$.  I would like the file name to be the same as the one that was
> selected.  When I look at the $fdat{ImageName} I noticed that the back
> slashes are gone (I am working on Win2K), but when I do a length on the
> string the result are that they are there.  So, still struggling with
perl,
> how can I break apart the info that is stored in the ImageName and pull
out
> the file name that is being saved?
> ...

I guess the backshlashes aren't gone, but when you output them via [+ +]
Embperl removes them. Set $escmode = 7, to tell Embperl not to tread
backslahses as escapes. To get the filename without directory you can use

use File::Basename ;

$file = basename ($fdat{imageName}) ;

There are other solution which were already mentioned

Gerald


-------------------------------------------------------------
Gerald Richter    ecos electronic communication services gmbh
Internetconnect * Webserver/-design/-datenbanken * Consulting

Post:       Tulpenstrasse 5         D-55276 Dienheim b. Mainz
E-Mail:     [EMAIL PROTECTED]         Voice:    +49 6133 925131
WWW:        http://www.ecos.de      Fax:      +49 6133 925152
-------------------------------------------------------------



---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to