Hi,

I don't know how to tell perl EOF, i am doing a search in a file like this:


$username eq 'wagner';
$file = 'c:\file';

open(INFO, $file);
do
{
$lines = <INFO>;
chop $lines;
}
while ($lines !~/$username/);
close(INFO);


The problem is if the file doesn't have a line with the word "wagner" it
become a infinte looping....

The while statement should be:

while (($linhas !~/$username/) || EOF);

But how is the correct sintax for EOF?????

Thanks in advance,
Wagner Garcia Campagner


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

Reply via email to