in reply to Replacing $mon with Jan, Feb, Mar by regex or other means
Here's what I said in the CB:
my $mon = qw(Jan Feb Mar Apr May Jun Jul Aug Sep Oct Nov Dec)[(localtime)[4]];
Create an anonymous array a list containing the abbreviated month names and return the array list element indexed by the zero based month number returned by (localtime)[4].
Updated: chromatic caught my blunder.
|
|---|