in reply to generating random filenames
As has been pointed out there are better ways of generating a random/temporary file name that is both unique and guaranteed to stay that way as you have an exclusive lock on the file.
It is good practice when generating random numbers to seed the random number generator first using srand. This works pretty well and carries the Camel seal of approval.
cheerssrand(time()^($$+($$<<15))); # now do something really random
tachyon
s&&rsenoyhcatreve&&&s&n.+t&"$'$`$\"$\&"&ee&&y&srve&&d&&print
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re: Re: generating random filenames
by particle (Vicar) on Jul 10, 2001 at 22:24 UTC | |
by tachyon (Chancellor) on Jul 10, 2001 at 22:49 UTC |