It's a great alternative for me because I need to integrate some other perl functions into uploads after their done, and with PHP none of this is possible.
Anyways my problem is that if a file already exists with the current filename in the target directory then it just over writes it instead of creating a new unique filename for it.
I build an MP3 uploader a year ago and basically checked if it existed and if it did then I renamed the uploaded file to (1)somefile.mp3 and then tried again increasing the file name with a (2), then (3) till it hit a uniqe name..
Now I am sure there are MUCH easier ways but its not like we have millions of files

What can be done to get files names to change dynamically if their is already a file existing in the that directory?