my $year= ( localtime (stat $file)[9] )[5] + 1900; #### my $year= ( localtime +(stat $file)[9] )[5] + 1900;