The reason, according to perldoc Time::localtime, is that the module replaces the core localtime function which returns an array with one that returns a Time::tm object instead. So you're expected to use the object's methods to get at its values. In this case, since the object is a blessed array reference, treating it as an ordinary array reference also works, but it probably isn't safe to assume it always will.
Aaron B.
My Woefully Neglected Blog, where I occasionally mention Perl.
In reply to Re^2: getting system time
by aaron_baugher
in thread getting system time
by akrrs7
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |