The difference boils down to this: localtime() is not a list, it's a function that returns a list when called in list context. When it's called in scalar context (such as when you force it with scalar or assign to a scalar value such as $now = localtime;) it returns a "pretty" version of the current date and time.
In reply to Re: what is scalar?
by myocom
in thread what is scalar?
by kiseok7
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |