in reply to read directory
also in the future, put <code></code> around code you post :)#!/usr/bin/perl use strict; use warnings; use CGI qw(:standard); my %cache = (); my @files = sort { $b->[1] <=> $a->[1] } map { [ $_, (stat($_))[9] ] } glob('pending/*'); print header; print "<table>\n"; for my $file (@files) { print "<tr><td>$file->[0]</td><td>" . localtime( $file->[1] ) . "</td></tr>\n"; } print "</table>\n";
-biz-
|
---|