$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);
In reply to Scanning directory for new files by asiufy
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |