in reply to what is scalar?

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.