use warnings; use strict; my @sta = stat($_); my @date = localtime($sta[8]); printf("%d-%d-%d\n",$date[4]+1,$date[3],$date[5]+1900);