Beefy Boxes and Bandwidth Generously Provided by pair Networks
good chemistry is complicated,
and a little bit messy -LW

Re: Re: Unlink Permission Denied

by rob_au (Abbot)
on May 03, 2002 at 05:52 UTC ( #163718=note: print w/replies, xml ) Need Help??

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.


Replies are listed 'Best First'.
Re: Re: Re: Unlink Permission Denied
by tachyon (Chancellor) on May 03, 2002 at 06:02 UTC

    When I said I could not see any good reason to do what seemed to being done I was refering to the external redirect and internal unlinking of the redirect file. I like the IO::File inplementation for temp files myself:

    require IO::File; $fh = new IO::File->new_tmpfile




Re: Re: Re: Unlink Permission Denied
by Marza (Vicar) on May 03, 2002 at 20:16 UTC

    Well now.

    This is what I love about this place. Always something new to learn from the posts.

    Never used File::Temp or IO::File for the matter. Makes more sense to use these mods for what I was doing. It also didn't require much change for the code!

    Thanks you and ++

Log In?

What's my password?
Create A New User
Node Status?
node history
Node Type: note [id://163718]
and all is quiet...

How do I use this? | Other CB clients
Other Users?
Others pondering the Monastery: (5)
As of 2018-06-24 20:46 GMT
Find Nodes?
    Voting Booth?
    Should cpanminus be part of the standard Perl release?

    Results (126 votes). Check out past polls.