in reply to rename doesn't work on OSX?

permissions is a good guess, but

rename($file, $newfile) || print "Rename $file to $newfile failed: + $!.\n";

will give you a lot more information including what the system thinks the problem is.


True laziness is hard work