in reply to searching several files for a string at one time
Hey, update here This is how far I've got so far
#!/usr/bin/perl use strict; use warnings; my $directory = 'C:\Users\Anthony\music'; opendir (DIR, $directory) or die $!; while (my $file = readdir(DIR)) { print "$file\n"; } closedir(DIR);
This lets me open any directory, but how do I make it so the users can select the directory when the programme is ran? Also, I found this code, whcih appears to do what I want, but I can't seem to merge it with what I already have
$ grep "redeem reward" /home/tom/*.txt
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re^2: searching several files for a string at one time
by toolic (Bishop) on May 06, 2010 at 19:39 UTC | |
by daggy (Novice) on May 06, 2010 at 19:52 UTC |