perlquestion
R56
<p>Hey all! Hoping someone can help me solve a little problem.</p>
<p>I'm parsing a block of free text in a file, and I have a pre-loaded array of specific terms.</p>
<p>When I parse that block of text into a string, I'm looking to cross reference each word on that string with the terms I have on the array. If there's a match between the two, print it out.</p>
<code>
if($text =~ /upperboundary(.+)lowerboundary/s){
if(grep {$_ eq $1} @terms){
print OUT "$1\t";
}
}
</code>
<p>This doesn't work, and I searched for a while on how to do it, to no avail. Can someone point me in a better direction? Thanks in advance!</p>