http://qs321.pair.com?node_id=1189940


in reply to File::Find find several strings in one directory

You seem to have a Unix environment, why not try ack? (It is written in Perl :) )

ack is simple to install, via CPAN, package or simple download. Read How

For work (Windows) I use docfetcher (although it is ancient).

For that onetime search: find . -name '*.htm*' -exec grep -i -e foo -e bar {} /dev/null \; (search for foo or bar inside .html and .htm files...)

Replies are listed 'Best First'.
Re^2: File::Find find several strings in one directory
by Staralfur (Novice) on May 10, 2017 at 08:29 UTC

    I must do it alone, it is a task for university, I wish I could've used it... I don't at all know how my script should look like in order for me to be able to extract the matches from the current directory into a new one..