rahed schreef:
> AndrewMcHorney:
>> I am looking for a perl function or functions that will give me the
>> date and time. I am going to use the results to create a unique file
>> name.
>
> There are many posibilities depending on uniqueness,
> this is quite similar:
>
> $randnum = 1000 + int rand(9000);
> $filename = time.'_'.$randnum;
You could put that inside a "while (1) {}",
that also contains a "-e $filename or last;",
but even then you would still risk a race condition.
--
Affijn, Ruud
"Gewoon is een tijger."
--
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
http://learn.perl.org/