http://qs321.pair.com?node_id=738256

Anonymous Monk has asked for the wisdom of the Perl Monks concerning the following question:

Dear Perlers I have a question about using a variable or a file in perl. my siplified code is as below, I have a string and want to remove the stopwords but it does not works since qw works in different way ...any clue?
#!/usr/bin/perl use strict; use Lingua::StopWords qw( getStopWords ); my $stopwords = getStopWords('en'); my $text='I want to remove stop words'; #my @words = qw ($text); print join ' ', grep { !$stopwords->{$_} } $words;
or even if there is any option for this, I would appreciate to know. thanks in advance.