http://qs321.pair.com?node_id=328312


in reply to How can I format the output of localtime?

If you want to do it without using any modules, and you want the m/d/y (or d/m/y, season to taste) format,
# Assuming you've got $timeval from a stat() call or some such my ($d,$m,$y) = (localtime($timeval))[3,4,5]; my $mdy = sprintf '%d/%d/%d', $m+1, $d, $y+1900;