Hrmmm, while your approach has merit, it doesn't really address the dogma that surrounds the more general issue of usage of temporary files in Perl - The movement of application temporary file generation into (presumably) owner-only writable directories makes a number of assumptions about the application platform:

The platform supports multiple users and path expansion of the tilde into home user directories,

The platform honours sticky-directory permissions so that the created temporary file remains accessible with permissions of the users home directory

Additionally, the use of function library calls for common tasks such as temporary file creation and utilisation offer greater cross-platform portability for applications with the differences in platform structure implemented within the library rather than the application code.

When putting a smiley right before a closing parenthesis, do you:

Use two parentheses: (Like this: :) )
Use one parenthesis: (Like this: :)
Reverse direction of the smiley: (Like this: (: )
Use angle/square brackets instead of parentheses
Use C-style commenting to set the smiley off from the closing parenthesis
Make the smiley a dunce: (:>
I disapprove of emoticons
Other