Note that if you want to do a "safe" rename, you can do so, although it involves a copy
I may have missed something, but I think it can be done much more easily like this:
sub rename_i { my($src, $dest) = @_; link($src, $dest) or die "Can't link $src to $dest: $!"; unlink($src) or die "Can't unlink $src: $!"; }
Hugo
In reply to Re^2: A DWIM too far?
by hv
in thread A DWIM too far?
by BrowserUk
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |