stew has asked for the wisdom of the Perl Monks concerning the following question:
$data = "DOCUMENT EXTRACTED FROM DB"; // etc open(WORDS, "commonwords.txt") || die ("Could not open common word +s file"); @stop_words = <WORDS>; close(WORDS); $_ = $data; foreach $stopword(@stop_words){ $data =~ ### DO SUBSTITUTION HERE }
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re: Using a variable as pattern in substitution
by VSarkiss (Monsignor) on Jun 05, 2002 at 15:05 UTC | |
by Popcorn Dave (Abbot) on Jun 05, 2002 at 18:13 UTC | |
by VSarkiss (Monsignor) on Jun 05, 2002 at 18:30 UTC | |
by stew (Scribe) on Jun 05, 2002 at 15:46 UTC | |
by VSarkiss (Monsignor) on Jun 05, 2002 at 16:21 UTC | |
by Aristotle (Chancellor) on Jun 05, 2002 at 17:12 UTC |