http://www.perlmonks.org?node_id=163718


in reply to Re: Unlink Permission Denied
in thread Unlink Permission Denied

I can't see any good reason to do it but you can do this on the command line

One place where this approach to files and file handles can be used is in the generation of temporary files - As discussed briefly in Using Temporary Files in Perl, where the underlying operating system allows this, temporary files can be unlinked while their file handle is held open. This results in an anonymous STDIO stream, which is excellent for the purposes of scoped temporal storage, side-stepping many of the race issues encountered in temporary file name generation and usage. The only disadvantage from this approach is that the data stored within the STDIO stream can only be accessed through the opened file handle.

This method of temporary file handling is also discussed briefly with reference to Windows systems in the File::Temp documentation.