in reply to Bus Error from threading IO::Socket

Personally, I'd re-cast your main loop as:

while( 1 ) { my $c = $lsn->accept; print "Client connected: $c"; threads->create( \&do_stuff, $c )->detach; undef $c; }

Whether that will make the slightest difference on your platform/versions I cannot test, but I have a hunch it might.


Examine what is said, not who speaks -- Silence betokens consent -- Love the truth but pardon error.
"Science is about questioning the status quo. Questioning authority".
In the absence of evidence, opinion is indistinguishable from prejudice.
"Too many [] have been sedated by an oppressive environment of political correctness and risk aversion."