in reply to sprintf the last 2 digits

Timtowdi, this makes sure it's an integer, but you still need sprintf to get the leading zero:

printf '%02d', $year %= 100;

After Compline,
Zaxo