http://qs321.pair.com?node_id=751796


in reply to Re^2: appending to a file
in thread appending to a file

The -e checks for the existence of a file, not writability. So the file test in question won't guarantee that your file can be opened for appending.