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
In reply to Re: generating random filenames
by tachyon
in thread generating random filenames
by Amoe
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |