Anonymous Monk has asked for the wisdom of the Perl Monks concerning the following question:

im a beginner to perl, but not programming and i just wrote a very basic perl chat server and client but i cant get the client to be able to know if the server has recieved and sent out a new message. ive tried a few methods such as checking if the filehandle is readable but that gets it stuck in an infinite loop. and i dont want to have it call a subroutine to print messages from the server every certain number of seconds thats gay. Someone please help!!!! thanks tristan

Replies are listed 'Best First'.
Re: checking for new messages
by chromatic (Archbishop) on Apr 18, 2001 at 09:00 UTC
    Without seeing your code, I highly recommend select, or the IO::Select module. I believe perlipc goes into great detail and provides some good examples of how to use this.

    You might also like merlyn's WebTechniques columns, several of which have highly-commented examples.