Results 1 to 3 of 3
I am reading a file. I want to find the line containing the string "Scores". I want to add the following 6 lines (as I know they are integers). I ...
- 10-26-2009 #1Just Joined!
- Join Date
- Oct 2009
- Posts
- 10
perl reading file
I am reading a file. I want to find the line containing the string "Scores". I want to add the following 6 lines (as I know they are integers). I am having trouble finding "Scores". I've done
open($read, "<List2.txt")or die $!;
$FINAL = "Maximum points per Lab";
while(<$read>){
print $_;
if($_ =~ m/"Maximum points per Lab"/)
for($i = 1; $i<=6; $i++)
$sum = <$read>
and I've tried replacing =~ with eq $FINAL
the if statement always evaluates to false
- 10-29-2009 #2
- 11-02-2009 #3Just Joined!
- Join Date
- Oct 2009
- Posts
- 10
it turned out the problem was I was giving it the wrong file

sorry about this, delete the post


Reply With Quote