Beefy Boxes and Bandwidth Generously Provided by pair Networks
"be consistent"
 
PerlMonks  

Re: Re: Re: CGI.pm's upload gives local filename, not file itself

by giulienk (Curate)
on Feb 04, 2002 at 07:58 UTC ( #143180=note: print w/ replies, xml ) Need Help??


in reply to Re: Re: CGI.pm's upload gives local filename, not file itself
in thread CGI.pm's upload gives local filename, not file itself

Using File::Basename isn't that easy indeed, cause you got to suggest him the operating system of the client.
You can do it by checking CGI server variables but i prefer the regex way, it's more straight forward IMHO.
Maybe split solution could be more readable, even if less efficient:

my $new_file_name = pop @{[split /\/|\\/, $full_path_name]};
$|=$_='1g2i1u1l2i4e2n0k',map{print"\7",chop;select$,,$,,$,,$_/7}m{..}g


Comment on Re: Re: Re: CGI.pm's upload gives local filename, not file itself
Download Code

Log In?
Username:
Password:

What's my password?
Create A New User
Node Status?
node history
Node Type: note [id://143180]
help
Chatterbox?
and the web crawler heard nothing...

How do I use this? | Other CB clients
Other Users?
Others scrutinizing the Monastery: (9)
As of 2014-09-23 09:33 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    How do you remember the number of days in each month?











    Results (216 votes), past polls