in reply to Re: Perl/Tk telnet client - reading server input in an Event Driven environment
in thread Perl/Tk telnet client - reading server input in an Event Driven environment

Hi!

I've never used the fileevent() so i may be wrong, but as for me 'readable' or 'writable' means, that the file is accessible in such mode - it doesn't mean that there is some data to read.
I found this problem using IO::Select's can_read() function. It returns all the file handles that are 'readable', but you still won't know which of them has an input waiting... Maybe it would work better for me if i used flock() on those files between data reads? Never mind - i've got a work-around ;-)

Greetz, Tom.
  • Comment on Re: Re: Perl/Tk telnet client - reading server input in an Event Driven environment

Replies are listed 'Best First'.
Re: Re: Re: Perl/Tk telnet client - reading server input in an Event Driven environment
by Ido (Hermit) on Mar 24, 2002 at 00:45 UTC
    From the Tk::fileevent doc: A filehandle is considered to be readable if there is unread data available on the underlying device.
      Ok - you are right. Sorry for disturbing your discussion.

      Greetz, Tom.