+ eval { CORE::link($from,$to) }
+|| system('cp', $from, $to) == 0
+|| warn "Couldn't link $from to $to: $!\n" unless $notify;
+}
+
+sub rename {
+ local($from,$to) = @_;
+ if (-f $to and not unlink($to)) {
+my($i);
+for ($i = 1; $i < 50; $i++) {
+ last if CORE::rename($to, "$to.$i");
+}
+warn("Cannot rename to `$to.$i': $!"), return 0
+ if $i >= 50; # Give up!
+ }
+ link($from,$to) || return 0;
+ unlink($from);