sysopen(FH, $path, O_WRONLY | O_EXCL | O_CREAT); [download]
In reply to Re: Safe File Handling by gloryhack in thread Safe File Handling by CloneArmyCommander