in reply to Working with IO::Socket in thread.

That code should work.

Does your perl binary actually have threads compiled in? Try looking at the output of perl -V and see if it claims usethreads=define in it somewhere? If it says undef, you need to get a new perl or recompile yours.

C.