JPaul has asked for the wisdom of the Perl Monks concerning the following question:
Functional, but oh so nasty.$widget->repeat(2000, \&CheckInput); MainLoop; sub CheckInput { foreach my $data ($select->can_read(1)) { my $rv = $data->recv(my $buffer, POSIX::BUFSIZ, 0); unless (defined($rv) && length $buffer) { &WWrite("\n[Disconnected]\n"); exit(0); } &WWrite(&filter($buffer)); } $widget->update(); }
JP,
-- Alexander Widdlemouse undid his bellybutton and his bum dropped off --
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re: Perl/Tk telnet client - reading server input in an Event Driven environment
by Ido (Hermit) on Mar 23, 2002 at 21:52 UTC | |
by tmiklas (Hermit) on Mar 23, 2002 at 22:39 UTC | |
by Ido (Hermit) on Mar 24, 2002 at 00:45 UTC | |
by tmiklas (Hermit) on Mar 24, 2002 at 11:16 UTC |