in reply to Re: Converting between localtime scalar and list contexts
in thread Converting between localtime scalar and list contexts

A warning on doing this kind of thing. Notice that bikeNomad determined the time only once; the other time values are based on it. That's very important 'cause if you do it this way:
my $time = time; my $ctime = localtime; my @timeArray = localtime;
which might seem more "natural", you leave yourself open to a very subtle and obsure bug: What if the second changes between one of those calls? It might look like an "off-by-one" error, but it only happens "sometimes". Maybe nothing serious happens. But what if midnight occurs between one of those calls? Depending on what you're doing with @timeArray and $ctime you will get inconsistent results. This could hurt. I have seen it happen.

Have fun,
Carl Forde