zulqernain has asked for the wisdom of the Perl Monks concerning the following question:
but it not removing the stopwords. does an one know why? and how i can fix it ?#!/usr/bin/perl use warnings; use strict; my (@data,$word,@lessWords,%stopwords,$stop); open( LIST, "stopwords.txt" ) or die "$!"; my @stopwords = <LIST>; close LIST; chomp @stopwords; $/=""; while(<>) { push @data, $_; } foreach $word (@data) { foreach $stop (@stopwords) { next if $word eq $stop; } push(@lessWords, $word); } print "@lessWords\n";
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re: can you please fix the error
by Joost (Canon) on Jun 01, 2005 at 16:47 UTC | |
by zulqernain (Novice) on Jun 01, 2005 at 17:49 UTC | |
by Joost (Canon) on Jun 01, 2005 at 17:53 UTC | |
by zulqernain (Novice) on Jun 01, 2005 at 18:01 UTC | |
by Joost (Canon) on Jun 01, 2005 at 18:21 UTC | |
|
Re: can you please fix the error
by davidrw (Prior) on Jun 01, 2005 at 16:43 UTC | |
|
Re: can you please fix the error
by dbwiz (Curate) on Jun 01, 2005 at 16:44 UTC | |
|
Re: can you please fix the error
by davidrw (Prior) on Jun 01, 2005 at 16:58 UTC | |
|
Re: can you please fix the error
by thundergnat (Deacon) on Jun 01, 2005 at 16:44 UTC |