You can get guaranteed uniqueness by replacing the rand call with a "hold this pid until the time changes":
$unique = time() . $$; sleep 1;
Hugo
In reply to Re^2: Need to Generate Unique String
by hv
in thread Need to Generate Unique String
by EchoAngel
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |