in reply to Background Sub?

This is actually a very big question. Let's say I could tell you how to move the listen to the background. What then? How would your program be notified when something happened on the socket? What if your program is doing something else when the notification comes in?

So, the roundabout answer is, you probably don't want to do it that way. Use Fcntl to set your socket to non-blocking, and then check it occasionally to see if anything's connected. Or, if all you're doing is waiting for connections and processing input, don't worry about the non-blocking stuff. Use select and let it tell you when something interesting happens. IO::Select is a nice module for such things.

BTW, Richard Stevens' _UNIX Network Programming_ is an invaluable resource for stuff like this.

*Woof*