On 1/21/06, Rick Triplett <[EMAIL PROTECTED]> wrote:
> I time stamp a lot of my file interactions with $stamp = time(), but
> about one out of a hundred or so stamps gives me the system epoch
> date instead of the true date.
If your time() function ever gives you the epoch (zero or undef),
that's a bug. Can you reproduce this?
> Correct me if I'm wrong, but I am
> assuming that the time() function makes a system call, and that it
> can be checked for failure.
Well.... the underlying system call could fail, but if perl isn't
taking care of that for you, that's a bug. You shouldn't have to work
around it. Reproduce it, then report it with perlbug.
> To do this, I've written the following
> "try again" routine
>
> sub get_time {
> if ($stamp = time() ) {return}
> else {$stamp = time()}
> $stamp;
> }
$stamp = time until $stamp;
...but that shouldn't be necessary. Hope this helps!
--Tom Phoenix
Stonehenge Perl Training
--
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
<http://learn.perl.org/> <http://learn.perl.org/first-response>