Shaveta_Chawla wants 8 to convert to 'Aug', so the code should really be:
>perl -wMstrict -le "my $months = 'JanFebMarAprMayJunJulSepAugOctNovDec'; my $month = 8; printf q{'%s'}, substr($months, $month*3, 3); " 'Aug'
In reply to Re^2: convert month number to month name
by AnomalousMonk
in thread convert month number to month name
by Shaveta_Chawla
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |