title: How can I remove stop words from a large text file?
body: <p>I have a billion word corpus which I have collected in a scalar. I have a .regex file that contains all the stop words that I want to eliminate from my data (text). </p>
  
  <p>I don't know how to use this .regex file, so I have made an array and stored all the stop words of the .regex file in my stop word array.</p>
  
  <p>To remove the stop words I do something like this:</p>
  
  <pre><code>grep { $scalarText =~ s/\b\Q$_\E\b/ /g } @stopList;
  </code></pre>
  
  <p>This takes a long time to execute. How can I use the .regex file in my Perl script to remove the stop words? Or is there any faster way to remove the stop words?</p>