Beefy Boxes and Bandwidth Generously Provided by pair Networks
The stupid question is the question not asked

Re: Re: Re: Re: "unique" filename?

by quidity (Pilgrim)
on Dec 04, 2000 at 05:12 UTC ( #44727=note: print w/replies, xml ) Need Help??

in reply to Re: Re: Re: "unique" filename?
in thread "unique" filename?

That might be so, but if you need the file to remain on the server for a while (as part of session management perhaps), then your method breaks.

With some operating systems, for instance OpenBSD, there is a chance that the same PID will occur twice within one second, especially on a heavily loaded site. You are also at risk of exposing your machines current position in the PID list, which could be of use to someone hoping to exploit the way someone has used the PID and time to seed a random number generator.

Use the modules, and you insulate yourself from these problems. CPAN is your friend.

Replies are listed 'Best First'.
Re: Re: Re: Re: Re: "unique" filename?
by repson (Chaplain) on Dec 04, 2000 at 07:02 UTC
    If you used Time::Hires then it is far less likely you would get the same value from time(). But then since you are already using a modules from CPAN it would be better to use one meant for what you are doing.
Re: Re: Re: Re: Re: "unique" filename?
by merlyn (Sage) on Dec 04, 2000 at 05:14 UTC

Log In?

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

How do I use this? | Other CB clients
Other Users?
Others chanting in the Monastery: (4)
As of 2017-09-23 04:01 GMT
Find Nodes?
    Voting Booth?
    During the recent solar eclipse, I:

    Results (270 votes). Check out past polls.