Anonymous Monk has asked for the wisdom of the Perl Monks concerning the following question:
#!/usr/local/bin/perl my $mydir="/path/dirname"; use strict; opendir(DIR,$mydir) || die "Could not open $mydir: $!\n"; my %files=map {$_,1} readdir(DIR); my %newfiles = ""; foreach my $file (keys %newfiles) { unless (exists $oldfiles{$file}) new_file(); }
update (broquaint): title change (was NOtification of a new file added to directory)
|
|---|