I don't think 'last until eof' will do what you think it's going to do.  If
'eof' is true, then the loop exits, and if it's false then it exits anyway
because of the 'last' statement.

If you're trying to read from STDIN until you get a proper response from the
user, then do something like this:

while ($email=<STDIN>)
{
        chomp;
        last unless $email;
        warn "You entered a blank line: try again!\n";
}

This loop will skip over any blank lines the user enters.
HTH! ;)

-----Original Message-----
From: Abdulaziz Ghuloum [mailto:[EMAIL PROTECTED]]
Sent: Thursday, July 26, 2001 1:40 PM
To: [EMAIL PROTECTED]
Subject: Re: "last until eof unless" question


Hello,

What does "last until eof unless email" mean?  I don't get what you're
after.  Can you explain what you're trying to do or include a snippet
from your program.

Aziz,,,

In article <5.0.0.25.0.20010726113250.00a199b0@linus>, "David Freeman"
<[EMAIL PROTECTED]> wrote:
> in my script i have the line currently reading
> 
> last unless $email;
> 
> i changed it to read
> 
> last until eof unless $email;
> 
> i get a error message for "eof unless" for a syntax error.  Is there a
> proper way to phrase this type of arguement so it would work?

-- 
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