Beefy Boxes and Bandwidth Generously Provided by pair Networks
Clear questions and runnable code
get the best and fastest answer

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]
[thao4]: I don't see where I can post my question. I am french so not good in English
[erix]: go to the bottom of this page: Seekers of Perl Wisdom
[karlgoethebier]: thao4: Si tout le reste échoue demande en francais ;-) There are some French speaking monks in the monastry...
[erix]: weird: a dev version perl (perl-5.27.9) is released, but git doesn't contain a perl-5.27.10 yet
[karlgoethebier]: ...not me ;-)

How do I use this? | Other CB clients
Other Users?
Others drinking their drinks and smoking their pipes about the Monastery: (8)
As of 2018-02-21 10:01 GMT
Find Nodes?
    Voting Booth?
    When it is dark outside I am happiest to see ...

    Results (276 votes). Check out past polls.