...
When open'ing a file use the three argument form of open (open FILEHANDLE, MODE, LEFT; ) when possible. This will prevent the redirect mode symbol(s) from being misinterpreted as part of the filename. This can be especially important when a user might provide the filename (e.g. in CGI script) and maliciously or unintentionally include a redirct symbol(s) in the filename.
Also always follow the open (or close) with an or die (by the way not a ||) to catch unexpected file/disk system errors.
T To make a file accessible to others in the group or to a cronjob use umask(0002);