in reply to list slice

If you want to do it all on one line then:
my ( $year ) = localtime( ( stat $file )[ 9 ] ) =~ /(\d{4})/;