in reply to Re: Re: Date formats
in thread Date formats

Naughty rob_au, bad boy!

You are calling localtime twice, which is setting yourself up for a race condition, should the code ever run on the crack of midnight of new year's eve. You could have the month from one day and the year from another.

Yes it's highly unlikely to happen, but it would be better to

my $date = do { my @now = localtime; sprintf("%02d%02d", $now[4] + 1, $now[3]); };

Why invite trouble?

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