in reply to print or die

It was already pointed out you can do:
print FILE <<EOF or die $!; blah, blah EOF
but that isn't enough. You should check the return value of close as well, because not every print will cause a flush. close will flush the buffer, and that might cause a disk quota exceeded event to happen.

-- Abigail