in reply to file name parsing to get the original file name
As Abigail-II suggested, use File::BaseName. However, if you are parsing HTML form input, beware: the module is not going to work regardless of the operating system of the client. Windows machines put backslashes (\) instead of slashes (/) for instance, so if you need to receive file uploaded by a Windows client and your program is on an Unix server, you'll need to do:
before calling the parsing function. The default FS type of the module depends on the operaing system where the script runs (it's decided upon examining the $^O variabile).