in reply to Simple threading example in Perl

Perl's threading model is experimental and unsafe. Unless this is just for personal amusement, and you are willing to accept random crashes for no good reason, I would suggest not using Perl's threading model.

If you want to use threading and Perl, it is possible, but the safe way to do it will involve some C programming. See Back to the Future of Threads (Part II) for details.