See
FileHandles and threads and
Passing sockets between segregated threads for examples of
BrowserUk's suggestion for passing fileno's between threads. It can be done. It's probably best to open the Socket in the thread, then pass back the fileno of the socket thru a shared variable to the main thread. It's tricky, and probably is easier with an event-loop system in the main thread (like Tk, Gtk2, or POE). Otherwise you will need a complex while loop using IO::Select to watch all the filehandles.