in reply to Re^4: Please advice
in thread Please advice
File::Find quite literally does what you require - it crawls over a directory tree and tests each file against criteria of your choosing. Your wanted function might look something like:
sub wanted { return unless -f; my $mtime = (stat)[9]; return unless $mtime > $limit_time; print "$mtime\t$File::Find::name\n"; }
where you would have stashed the user input date converted to epoch time in $limit_time.
I mean this with respect, but I believe you are trying to run before you can walk. Do you have programming experience in other languages, or is this your first one? I note you have an unused loop index variable $i, an unused iteration variable $_ and uninitialized $file variable. I would suggest you review http://learn.perl.org/ for some reference resources. In particular, Beginning Perl is widely considered a strong introduction.
|
|---|