graff,
Yes.
rename does not work across file systems (usually). Now while the original code is changing the name in place, using
File::Copy instead of
rename allows modifications to the location of the new file without breaking anything.
Cheers - L~R