#!/usr/bin/perl -wT use strict; my $dir = "/var/www/html/file"; my @files; opendir (FILE,$dir) || die "'$dir' $!"; @files = grep {-f "$dir/$_"} readdir (FILE); closedir (FILE) || die $!; foreach my $file (sort(@files)) { my $mtime = (stat("$dir/$file"))[9]; print "$mtime => $file\n"; };
-Blake
In reply to Re5: A little help w/ stat() por favor...
by blakem
in thread A little help w/ stat() por favor...
by augamecock
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |