my $months = 'JanFebMarAprMayJunJulAugSepOctNovDec'; my $month = 8; print substr($months, $month*3, 3), "\n";