in reply to Re^2: convert month number to month name
in thread convert month number to month name
Hmmm ... why not map *all* of 'em to Aug?
my $months = 'AugAugAugAugAugAugAugAugAugAugAugAug'; my $month = 8; printf '%s', substr($months, $month*3, 3);
Then we could simplify it a bit:
my $month = 8; printf '%s', substr('Aug'x12, $month*3, 3);
;^)
...roboticus
When your only tool is a hammer, all problems look like your thumb.
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re^4: convert month number to month name
by AnomalousMonk (Archbishop) on Aug 30, 2012 at 14:53 UTC |