Shylock has asked for the wisdom of the Perl Monks concerning the following question:
$dirName = "/blahdeblah/source"; open (FIELDS, "fields.dat") or die $!; open (FOUND, ">found.dat") or die $!; while (<FIELDS>) { $field = $_; while (defined($nextfile = <$dirName/*cm*.4gl>)) { $rc = system ("grep $field $nextfile 1>/dev/null"); if (!$rc) { print FOUND "$field $nextfile\n"; last; } } }
Edited by Chady -- added code tags.
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re: Glob seekpointer
by Tanktalus (Canon) on Feb 25, 2005 at 05:37 UTC | |
by Shylock (Acolyte) on Feb 25, 2005 at 06:05 UTC | |
|
Re: Glob seekpointer
by tilly (Archbishop) on Feb 25, 2005 at 06:00 UTC | |
by Shylock (Acolyte) on Feb 25, 2005 at 06:23 UTC | |
|
Re: Glob seekpointer
by BrowserUk (Patriarch) on Feb 25, 2005 at 06:47 UTC | |
|
Re: Glob seekpointer
by mifflin (Curate) on Feb 25, 2005 at 05:28 UTC | |
by tilly (Archbishop) on Feb 25, 2005 at 05:53 UTC |