Or use Path::Tiny's trick: open the file for append, lock it, truncate to 0, then write new data :)
( Untested, let me know if it works :)
In reply to Re^2: Vexing Race Condition
by tybalt89
in thread Vexing Race Condition
by Maelstrom
For: | Use: | ||
& | & | ||
< | < | ||
> | > | ||
[ | [ | ||
] | ] |