<?xml version="1.0" encoding="windows-1252"?>
<node id="995306" title="Some Basic Help." created="2012-09-24 03:53:01" updated="2012-09-24 03:53:01">
<type id="115">
perlquestion</type>
<author id="952891">
invaderzard</author>
<data>
<field name="doctext">
&lt;code&gt;use Modern::Perl
open trained , 'D://ARP//libsvm-3.12//families//antioxidant//training.scale';
open predict , 'D://ARP//libsvm-3.12//families//antioxidant//testing.scale';
my $counter =  0;
while (&lt;trained&gt;) {
	my $train = $_;
while (&lt;predict&gt;) {
	#print $_;
	
	my $predict = $1;
	if ($train = $predict) {
	#print $train;
	$counter = $counter + 1
}
}
}
print $counter;&lt;/code&gt;

&lt;p&gt;Sup guys. There's something that I need to clarify. for the line "my $predict = $1;", i want to define it as the current line of &lt;predict&gt; in the while function. I tried $_ and it gave me the line from &lt;trained,&gt; but when I tried $1 it was initialized.&lt;/p&gt;

&lt;p&gt;What should I do to get the line from &lt;predict&gt;?&lt;/p&gt;</field>
</data>
</node>
