Hi,
I tried to print a file name and its modified date and size.
I have 2 issues for some files when I tried to print their modified date: I get "Dec 5:" instead "5 Dec 13:01" including the time. But for other files I get the right result as "11 Dec 13:01".
The second issue is related to the size I get 0 and all of files are not empty.
Can someone help me to fix this issue?
Thanks a lot,
Imad77
============
print qq~
<table border="1" cellpadding="4">
~;
my $filefull=$path."/".$file;
$m = (stat "$filefull")[9];
my $size10 = (stat "$filefull")[7];
$j=(scalar localtime($m));
my ($day, $month, $day, $time, $year) = split(/ /, $j);
my ($t1,$t2,$t3)=split(/:/, $time);
my $md = $day.' '.$month.' '.$t1.':'.$t2;
print qq~ <tr><td><a $file</a></td>
~;
print qq~ <td> $size10</td>
~;
print qq~ <td> $md</td></tr>
~;
print qq~
</table>
~;
I tried to print a file name and its modified date and size.
I have 2 issues for some files when I tried to print their modified date: I get "Dec 5:" instead "5 Dec 13:01" including the time. But for other files I get the right result as "11 Dec 13:01".
The second issue is related to the size I get 0 and all of files are not empty.
Can someone help me to fix this issue?
Thanks a lot,
Imad77
============
print qq~
<table border="1" cellpadding="4">
~;
my $filefull=$path."/".$file;
$m = (stat "$filefull")[9];
my $size10 = (stat "$filefull")[7];
$j=(scalar localtime($m));
my ($day, $month, $day, $time, $year) = split(/ /, $j);
my ($t1,$t2,$t3)=split(/:/, $time);
my $md = $day.' '.$month.' '.$t1.':'.$t2;
print qq~ <tr><td><a $file</a></td>
~;
print qq~ <td> $size10</td>
~;
print qq~ <td> $md</td></tr>
~;
print qq~
</table>
~;