in reply to Re^4: hang caused by read / readline?
in thread hang caused by read / readline?
my $buf = ''; local $/ = \4096; while (<>) { s/\0+//g; $buf .= $_; process_line("$1") while $buf =~ s/^(.*)\n//; } process_line($buf) if length($buf);
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re^6: hang caused by read / readline?
by grepdashv (Initiate) on Sep 04, 2009 at 18:53 UTC | |
by ikegami (Patriarch) on Sep 04, 2009 at 19:07 UTC | |
by grepdashv (Initiate) on Sep 04, 2009 at 23:21 UTC |