On Thursday 08 July 2004 09:25, perl.org wrote: > > I am doing something like: > > ( $data{sec}, $data{min}, $data{hour}, $data{day}, $data{mon}, > $data{year}, $data{wday}, $data{yday}, $data{isdst} ) = localtime( > $^T );
You like typing a lot? :-) You could use a hash slice. @data{ qw[sec min hour day mon year wday yday isdst] } = localtime $^T; > If I do this repeatedly on Windows for one invocation of a Perl > script, the value of $data{sec} can vary by 1. Is there an > explanation for this? Leap second? :-) Just kidding. I don't know why it is changing, (I can't see your entire program) but perhaps you should just store the current time in a scalar and see if that helps. my $current_time = $^T; Or: my $current_time = time; John -- use Perl; program fulfillment -- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] <http://learn.perl.org/> <http://learn.perl.org/first-response>