in reply to Renaming file without forward slash
You can use the standard module File::Basename to break a file apart into its path, filename, and extension.