in reply to extract month and year from localtime
If you use localtime in list context (for example by assigning it to an array or a list), you get all parts separately. For example it says in the documentation:
($sec,$min,$hour,$mday,$mon,$year,$wday,$yday,$isdst) = localtime(time +);
|
|---|