I was given the attached Perl code to do the following:
1. I have a folder with file names that are codes like 006500000aBcDe.
2. I have a file called Attachments.csv that has a column of codes that will match the file names and a column of meaningful file names such as "proposal for XYZ Corp.doc".
The Perl program is supposed to match the codes and rename the files to have the meaningful file names instead of the codes. It seemed to work as all the file names got changed and the amount of files in the folder did not change.
However, as I am now doing something else with the renamed files I am finding that some of them somehow did not get renamed properly. That is, for example, the file was supposed to be changed from the code to "proposal for XYZ Corp, Inc." but it didn't. It got changed to SOMETHING because the file with the original code name is not there and I didn't lose any files.
So far, it seems like it only happened for files that had a comma in the file name. I need someone to look at this Perl program and tell me if it would malfunction if the file name had a comma.