I am trying to determine a perl method to add an extension to a list of files. I can already rename a list of files with a certain extension to some other extension, but I need to be able to do this for any file name, whether or not it already has an extension.
For example, I have a list of files such as:
file1
file2
file3
ps.dir
And I want to rename them ALL to filename.extension:
file1.bad
file2.bad
file3.bad
ps.dir.bad