use Modern::Perl open trained , 'D://ARP//libsvm-3.12//families//antioxidant//training. +scale'; open predict , 'D://ARP//libsvm-3.12//families//antioxidant//testing.s +cale'; my $counter = 0; while (<trained>) { my $train = $_; while (<predict>) { #print $_; my $predict = $1; if ($train = $predict) { #print $train; $counter = $counter + 1 } } } print $counter;
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 <predict> in the while function. I tried $_ and it gave me the line from <trained,> but when I tried $1 it was initialized.
What should I do to get the line from <predict>?
In reply to Some Basic Help. by invaderzard
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |