The reason I didnt want to detach the thread is because this is for the IRC client that I had to recode using Parse::IRC. I cant print to the $sock in the main code line making the user unable to send a message to the server. If I could get the while loop to be non-blocking then I could send a signal that tells the thread to send a message to the server (which now that I think about seems primitive). I may try the