in reply to non-blocking listen on a tcp server

while(<$connection>) { # waits for data

I think you want select, or the easier to use IO::Select.

Replies are listed 'Best First'.
Re^2: non-blocking listen on a tcp server
by ikegami (Patriarch) on Jun 09, 2010 at 18:43 UTC
      Thanks alot folks. You're giving me good ideas.

      ikegami, I like the Coro option - the code is neat. I'm still trying to get my head around it though.

      The example doesn't appear to have the forking server but I need my server to handle multiple client connection simultaneously.

      Is that still an option when using Coro?
        forks also provides async, but forks instead of creating threads.