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
lin0Hi 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 | |
by lin0 (Curate) on Nov 11, 2006 at 05:27 UTC |