in reply to Re^2: can you please fix the error
in thread can you please fix the error
using a hash for @stopwords would make this code simpler and faster, though. There are some examples in this thread somewhere.foreach $word (@data) { my @arr=split(/ /,$word); WORD: foreach $a (@arr) { foreach $stop (@stopwords) { next WORD if $a eq $stop; } push(@lessWords, $word); } }
update: the above code is still buggy. See below for a much simpler version that should work.
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re^4: can you please fix the error
by zulqernain (Novice) on Jun 01, 2005 at 18:01 UTC | |
by Joost (Canon) on Jun 01, 2005 at 18:21 UTC |