asiufy has asked for the wisdom of the Perl Monks concerning the following question:
$dir = "/home/sites/home/users/admin/test/";
opendir (DIR, $dir) or die "cannot opendir $dir";
{
$time = substr(time, length(time)-1, 1);
if ($time eq "0") {
my @only_files = grep {-f "$dir/$_"} readdir(DIR);
foreach my $file (@only_files) {
&process_file ($file);
}
}
redo;
}
closedir (DIR);
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re: Scanning directory for new files
by repson (Chaplain) on Dec 14, 2000 at 07:09 UTC |