You may want to cycle through the file, line by line:

while(<RSTDATA>){
        chomp;
        if( . . .

        }
}

That should do it.

-----Original Message-----
From: Glenn Cannon [mailto:[EMAIL PROTECTED]]
Sent: Friday, April 05, 2002 3:57 PM
To: [EMAIL PROTECTED]
Subject: Problem testing variable


open (RSTDATA, "rst/r".$event.".rst")|| print "Oops";
$winner = <RSTDATA>;
if ($winner eq "na")
{
print "Finalists<br>Did Not Play";
}
else
{
print $winner;
}

Why does the above code always print the value of $winner, and never
Finalists<br>Did Not Play, even when the line of text in the file is
just the letters na?


-- 
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

-- 
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to