in reply to Swapping Files

If you want the change from one file to the other to be seemless, you could do
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.