Anonymous Monk has asked for the wisdom of the Perl Monks concerning the following question:
@id =<ID_LIST>; chomp(@id); while($data = <DB>) { chomp($data); foreach $id (@id) { if ($data =~ /$id/) { print OUT "$data\n"; } } } __comment__ sample contents of the ID_LIST: user45-16.dept12 user35-18.dept19 user05-14.dept10 sample contents of the DB: (3 MB of text) home--user45-16.dept12-ph#435 home66--user05-17.dept19-ddfg#5;v6.0234 home4--user35-18.dept19-hj#5 home87--user05-14.dept10-dfg#7;v2.0
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re: need more efficient way to write this query script
by Ovid (Cardinal) on Aug 15, 2002 at 23:42 UTC | |
|
Re: need more efficient way to write this query script
by RMGir (Prior) on Aug 15, 2002 at 23:38 UTC | |
|
Re: need more efficient way to write this query script
by grep (Monsignor) on Aug 15, 2002 at 23:26 UTC | |
by Anonymous Monk on Aug 16, 2002 at 07:09 UTC | |
by perrin (Chancellor) on Aug 16, 2002 at 14:29 UTC | |
|
Re: need more efficient way to write this query script
by dws (Chancellor) on Aug 16, 2002 at 02:11 UTC | |
by Ovid (Cardinal) on Aug 16, 2002 at 04:52 UTC | |
by dws (Chancellor) on Aug 16, 2002 at 04:58 UTC |