in reply to Removing Stopwords from a String

CPAN to the rescue...

From Lingua::StopWords:

use Lingua::StopWords qw( getStopWords ); my $stopwords = getStopWords('en'); my @words = qw( i am the walrus goo goo g'joob ); # prints "walrus goo goo g'joob" print join ' ', grep { !$stopwords->{$_} } @words;

From Lingua::EN::StopWords:

use Lingua::EN::StopWords qw(%StopWords); my @words = ...; # Print non-stopwords in @words print join " ", grep { !$StopWords{$_} } @words;