
$0.05$
Novice
Jul 22, 2002, 12:01 PM
Post #1 of 2
(3712 views)
|
problem with RENAME function..
|
Can't Post
|
|
ok, what im doing, is uploading an image file to a directory. After the image is uploaded, i wish to rename it, so here is the code that im using if (lc($filename) =~ /\.jpg|\.gif|\.jpeg|\.png/){ print "file accepted"; open UPLOADFILE, ">$upload_dir/$filename"; while ( <$upload_filehandle> ) { print UPLOADFILE; } close UPLOADFILE; ($t, $handle) = split(/\./, $filename); rename("$upload_dir/$filename","$upload_dir/$newfilename");
|