in reply to Re^2: searching several files for a string at one time
in thread searching several files for a string at one time

So the correct procedure would be to ask the user to specify the directory they wish to search in

Use Glob to list all files in the directory? Or should I use glob to search for 'monk' and glob would bring back a list of files with 'monk' in them?

then use Grep to specify which lines the word 'monk' is on?

What is bsd_glob..

Sorry for the completely noob like comments, but I'm a complete noob so it's to be expected.
  • Comment on Re^3: searching several files for a string at one time

Replies are listed 'Best First'.
Re^4: searching several files for a string at one time
by Corion (Patriarch) on May 06, 2010 at 11:38 UTC

    See File::Glob for bsd_glob. It is much like glob but has sane whitespace handling.

    You don't have to ask the user for the search term. See perlvar on @ARGV to see how you can retrieve the command line arguments that were given to your script.