$var =~ tr/^\\\w+$//; # replace slashes and words with none, so this
                   # kinda leaves you with nothing that the filename.
                   # UNTESTED!

I also recommend:
$var =~ s/[^\w.-]/_/g; # which translate's some signs to underscores (_)



--------------
Bob Erinkveld (Webmaster Insane Hosts)
www.insane-hosts.net
MSN: [EMAIL PROTECTED]





From: "Scot Robnett" <[EMAIL PROTECTED]>
To: <[EMAIL PROTECTED]>
Subject: Upload (probably a stupid question)
Date: Fri, 6 Dec 2002 10:37:11 -0600

How do I make my script only send the filename rather than the full path
when I use the CGI.pm upload function?

For example, when I upload the document

test.xls

On the remote server, it's being named with the full path of where I sent it
from, like this

C:\Documents and Settings\SRobnet\Desktop\test.xls

How can I get it to just leave the filename as "test.xls" on the remote
server without appending my entire local path to it?

-----
Scot Robnett
inSite Internet Solutions
[EMAIL PROTECTED]



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

_________________________________________________________________
MSN Zoeken, voor duidelijke zoekresultaten! http://search.msn.nl/worldwide.asp


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

Reply via email to