#8 STDOUT/STDIN problem

closed
nobody
None
5
2001-11-25
2001-10-15
Hugh S. Myers
No

If you use this following:

print ">> ";
while (<>) {
if (/quit/i) {
last;
}
print ">> ";
}

you won't see the prompt until after you type 'quit'
and hit return.

hsm

Discussion

  • Logged In: NO

    This could be a buffer problem. Try this:
    $|=1;
    print ">> ";
    while (<>) {
    if (/quit/i) {
    last;
    }
    print ">> ";
    }

     
    • status: open --> closed