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

Hi Monks,
I am comparatively new to Perl. My problem is as follows:

1. I have few text files saved in a folder with some description. E.g. A part number of this part is P0455 with rattling as a symptom. I have fixed this problem.

2. I also have another file called, stopwords.txt saved which has a list of stop words in english such as, a I as this with etc.

3. Now I need to read the text files from a folder and from each file delete the stop words that are in stopwords. txt file.

4. Finally after deleting the stop words I need to write these files back in a new location.

Can anyone help me with this?

Thanks
Dnyanesh
  • Comment on How do I delete stopwords in text file...

Replies are listed 'Best First'.
Re: How do I delete stopwords in text file...
by Anonymous Monk on Mar 03, 2009 at 10:10 UTC
Re: How do I delete stopwords in text file...
by ELISHEVA (Prior) on Mar 03, 2009 at 10:16 UTC

    Welcome to Perl Monks!

    We will be glad to help you learn Perl, point out CPAN modules that may help you and explain the various algorithms needed to solve your problem, but Perl Monks is not a code writing service.

    If you have written any code already, please post and explain what parts of it aren't working as you expect. If you haven't done that yet, please make an attempt and post what you have done. It doesn't have to be right, but it does have to show what you have tried to make work already.

    To post the code, click on the title of your post. This will take you to an edit form. At the bottom of the edit box, add something like this:
    <code> #cut and paste your code here </code>

    See also, How (Not) To Ask A Question - there is a lot of helpful advice there.

    Best, beth

Re: How do I delete stopwords in text file...
by rovf (Priest) on Mar 03, 2009 at 11:26 UTC

    How about putting the stopwords into a hash?

    -- 
    Ronald Fischer <ynnor@mm.st>