my $timestamp = { my( $year, $month, $date ) = ( localtime )[ 5, 4, 3 ]; $year += 1900; $month++; join '-', $year, $month, $date; };