http://www.perlmonks.org?node_id=318191


in reply to Re: sorting entires by date
in thread sorting entires by date

I would advise writting to a temp file and moving that tempfile over the original since moves are closer to atomic as a perl instruction. If someone SIG'd your program in the middle, you may lose data.

Play that funky music white boy..

Replies are listed 'Best First'.
Re^3: sorting entires by date
by Aristotle (Chancellor) on Jan 01, 2004 at 23:47 UTC
    Good point - and to be truly lazy you hide this behind IO::AtomicFile. :)

    Makeshifts last the longest.