in reply to Re: Buffering issue with \r (backslash r)?
in thread Buffering issue with \r (backslash r)?

Ahhh...I always overlook basic principles. So <> reads lines by definition. Thank you very much.

Replies are listed 'Best First'.
Re^3: Buffering issue with \r (backslash r)?
by ikegami (Patriarch) on Oct 27, 2009 at 14:38 UTC

    Out of curiosity, I'd like to know what you thought it did.

    <> is either a shortcut for readline or glob depending on how its used.

      I forgot that <> reads lines (or more accurately, readline or glob, as you pointed out). Rather, I thought it would just read the input as it came. And since I set autoflush for STDOUT, I expected to get it in real time.

      Thanks again!

        Only sysread returns characters as it receives them. read returns when the specified number of characters have been read, and readline returns when an end of line marker is found. (Reaching the end of file or encountering an error will have them return before that, of course.)

        I forgot that <> reads lines (or more accurately, readline or glob, as you pointed out).

        glob doesn't read files. I pointed out that <> can be a shortcut for glob, not that glob reads lines.