in reply to perl one-liner

So in other words, you just want to overwrite a file? Why not just open it with '>'?