in reply to Swapping Files
use File::Copy qw( copy ); copy($old, "$old.bak") or die("Unable to backup \"$old\" to \"$old.bak\": $!\n"); rename($new, $old) or die("Unable to replace \"$old\" with \"$new\": $!\n");
If the new and the old (original) file are on the same volume, there will never be a time where the file is missing or incomplete.
Update: I think I misunderstood "B*" and that this doesn't answer the question.
|
|---|