in reply to Re^2: Looking for syntactic shortcut
in thread Looking for syntactic shortcut

which should read:
print +(localtime)[5]
(note the + before the opening bracet, to prevent print from thinking it's his. When assigning to a variable, you say:
my $year = (localtime)[5]
just as you state in your own post :)

Paul