rename($file, $newfile) || print "Don't have permission to rename: $!\ +n";
According to the documentation for rename,
Behavior of this function varies wildly depending on your system implementation. For example, it will usually not work across file system boundaries, even though the system mv command sometimes compensates for this. Other restrictions include whether it works on directories, open files, or pre-existing files. Check perlport and either the rename(2) manpage or equivalent system documentation for details. For a platform independent move function look at the File::Copy module.You could try File::Copy.
In reply to Re: rename doesn't work on OSX?
by toolic
in thread rename doesn't work on OSX?
by mmfuller
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |