use strict; use warnings; use Time::Piece; my $t2 = localtime; print "Time is $t2\n"; print "Year is ", $t2->year, "\n";