laziness, impatience, and hubris | |
PerlMonks |
Re^5: Please adviceby kennethk (Abbot) |
on Aug 11, 2011 at 16:05 UTC ( [id://919904]=note: print w/replies, xml ) | Need Help?? |
The bad symbol error is caused because you are attempting to feed readdir a string and not a directory handle object. You get a directory handle object from a call to opendir.
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:
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.
In Section
Seekers of Perl Wisdom
|
|