flieckster has asked for the wisdom of the Perl Monks concerning the following question:
#!/usr/bin/perl -w use File::Basename; use POSIX qw(strftime); my $time = strftime("%r",localtime); my $dir = "/Users/flieckb/Desktop/testing/2push/"; chdir( $dir ) or warn "$!"; (@dir_files) = glob "*"; my $dircount = @dir_files; if (@dir_files > 0) { print "$time there are @dir_files files\n"; sleep (10); (@dir_files2) = glob "*"; if (@dir_files != @dir_files2) { $equals = 0; print "$time there are @dir_files files\n"; print "$time there are @dir_files2 files\n"; } else { $equals = 1; print "$time there are @dir_files2 files\n"; } }
|
---|
Replies are listed 'Best First'. | |
---|---|
Re: glob directory to array, then wait, and check again
by Athanasius (Archbishop) on Aug 19, 2017 at 16:13 UTC | |
by flieckster (Scribe) on Aug 20, 2017 at 01:20 UTC | |
Re: glob directory to array, then wait, and check again
by afoken (Chancellor) on Aug 19, 2017 at 19:04 UTC | |
Re: glob directory to array, then wait, and check again
by stevieb (Canon) on Aug 19, 2017 at 15:30 UTC |