http://qs321.pair.com?node_id=1106478


in reply to localtime parse within hash init

You neglect the Time::Piece core module. Enumerating the accessor names yourself is a code smell.
perl -MTime::Piece=localtime -E ' my %stuff = ( otherinfo => "this and that", dateinfo => scalar localtime ); say "sec=", $stuff{dateinfo}->sec, "year=", $stuff{dateinfo}->year '

Replies are listed 'Best First'.
Re^2: localtime parse within hash init
by NetWallah (Canon) on Nov 07, 2014 at 20:48 UTC
    Excellent ! - thank you. I'll incorporate that in.

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