<?xml version="1.0" encoding="windows-1252"?>
<node id="661300" title="Re: line by line match on an array of strings" created="2008-01-09 05:13:41" updated="2008-01-09 00:13:41">
<type id="11">
note</type>
<author id="495617">
Punitha</author>
<data>
<field name="doctext">
&lt;p&gt;Hi [barryscott]&lt;/p&gt;
&lt;p&gt;This may also help you in addition to [j1n3l0]&lt;/p&gt;
&lt;c&gt;
use strict;

my @typedefs = qw(do re me fa so la ti do);
while (my $line = &lt;DATA&gt;) {	
	chomp($line);
	if(grep/$line/, @typedefs){
  	print "$line\n";
  	## perform various actions here if line match
	}
}
__DATA__
do
me
a
favour
will
you

&lt;/c&gt;
&lt;p&gt;Punitha&lt;/p&gt;</field>
<field name="root_node">
661292</field>
<field name="parent_node">
661292</field>
</data>
</node>
