in reply to built-in gmtime() returning one month off?

So far the other responses have all given correct advice, however, you may still be wondering about the reason months are off by one.

The reason the value is as it is is so that you may use it to index an array of month names, without wasting the first element. Thus, you could get the month name with something like:

my $month_name = (qw/Jan Feb Mar Apr May Jun Jul Aug Sep Oct Nov Dec/)[$month];

There is some method to the madness...


print@_{sort keys %_},$/if%_=split//,'= & *a?b:e\f/h^h!j+n,o@o;r$s-t%t#u'