Follow along with the video below to see how to install our site as a web app on your home screen.
Note: This feature may not be available in some browsers.
my @stats = stat("$folder/$file");
my $date = format_time($stats[9]);
sub format_time {
my @time = localtime $_[0];
$time[4]+=1; # Adjust Month
$time[5]+=1900; # Adjust Year
return sprintf '%4i-%02i-%02i %02i:%02i:%02i', @time[reverse 0..5];
}
my $date = qq|@date[4,1,2,3]|;
By the way, the last line could be shorter :
CODE
my $date = qq|@date[4,1,2,3]|;
[u]DB<1>[/u] @date = split / /, localtime;
[u]DB<2>[/u] $date = qq|@date[4,1,2,3]|;
[u]DB<3>[/u] print $date;
2008 Dec 22 12:40:52