Your skill will accomplish what the force of many cannot |
|
PerlMonks |
Re: Parse for a name after a keyword search in all the files, given directory as inputby choroba (Cardinal) |
on Feb 17, 2017 at 08:36 UTC ( [id://1182191]=note: print w/replies, xml ) | Need Help?? |
> all the files recursively There's no recursion happening in the code. To use recursion, you have to move the code to a subroutine, and call that subroutine from itself (when entering a subdirecory). Another approach would be to shift from @allfiles in a while-loop instead of foreach , and pushing the new directories back to @allfiles for further processing.
In Section
Seekers of Perl Wisdom
|
|