in reply to Re: localtime parse within hash init
in thread localtime parse within hash init

thanks roboticus (++).

That leads to:

perl -E 'my %stuff=(otherinfo=>"this and that", dateinfo=> sub{ my %r; @r{qw|sec min hour mday mon year wday yday isdst|} =localtime(time); return \%r}->()); say "sec=",$stuff{dateinfo}{sec}, " year=",$stuff{dateinfo}{year}'
Which works, is pretty decent, and free of external modules.

        "You're only given one little spark of madness. You mustn't lose it."         - Robin Williams