note
samtregar
The problem with:
<p>
<code>my ($in) = <CURR>;</code>
<p>
Is that it puts <CURR> in list context. That causes it read all the lines in your file and then put the first one in $in! Instead you want:
<p>
<code>my $in = <CURR>;</code>
<p>
Which will read just one line. Reading from two files should work with something like:
<p>
<code>
open FILE1, "<", "file1.txt" or die $!;
open FILE2, "<", "file1.txt" or die $!;
while (!eof(FILE1) and !eof(FILE2)) {
my $line1 = <FILE1>;
my $line2 = <FILE2>;
# ...
}
</code>
<p>
-sam
762634
762634