in reply to Re^2: Best way to handle readline errors?
in thread Best way to handle readline errors?

Update

I just want to withdraw my answer to the question. I want to apologize to the OP for not answering the question and adding noise in the process. On my defense, I wanted to help but I guess I was too tired to think clearly

All the best

lin0

Hi jrw,

maybe you are interested in something like this piece of code I found and adapted from the perldoc for readline

for (;;) { undef $!; unless (defined( $data = <$fh> )) { die $! if $!; last; # reached EOF } # do what you need to do with your data # like: # chomp($data); # ... }

I hope this helps

lin0

Replies are listed 'Best First'.
Re^4: Best way to handle readline errors?
by ikegami (Patriarch) on Nov 11, 2006 at 03:17 UTC
    Did you actually read what he posted?

      Update

      Thanks to ikegami for the comment. I am not sure what I was thinking yesterday. Having read the original question today made me realize that I was answering something completely different


      yes. but I might have missed the whole point