..grey { background-color: #cccccc; }Hello. I don't know how dumb this is going to sound, but here goes:
i'm writing a website that requires an upload for pictures. I have figured out how to get the image, upload it to the correct dirctory and save successfully, but the problem comes with the fact that i have to specify the filename. i want to know how to grab the filename from the input of the following script (and by the way, i do not take credit for this script. i've only been programming in perl for about a day) #!c:/perl/bin/perl.exe $CGI::POST_MAX = 2048; print "content-type: text/html\n\n"; binmode(STDIN); @inx = <STDIN>; splice(@inx,0,4); splice(@inx,$#inx,1); $in = join("",@inx); $in = substr($in,0,length($in) - 2);; open(ff,">../htdocs/pics/z.jpg"); binmode(ff); print ff $in; close(ff); print "DONE, Uploaded Size: ".length($in)." bytes"; obviously in the open(ff, ">../htdocs/pics/z.jpg"); i don't want it to save the picture as "z.jpg" i want it to be saved under it's original filename. So how do i draw out the filename minus the directory settings (i.e. c:/my documents)? Thank you in advance, Nathan Cox --------------------------------- Do You Yahoo!? Yahoo! Health - Feel better, live better