soumyapanda has asked for the wisdom of the Perl Monks concerning the following question:

use threads; $thr = threads->new(\&sub1); sub sub1 { print "In the thread\n"; }

"this Perl not built to support threads"

I'm getting this error when i try to run the program using perl 5.10

please assist me to run a multithreading program using perl 5.10

Replies are listed 'Best First'.
Re: Multithreading in perl
by Corion (Patriarch) on Jul 20, 2011 at 13:22 UTC

    You will need to build a Perl with threads. See App::perlbrew for example, or just download the Perl tarball and compile it yourself.

    If both approaches are too difficult, ask your system administrator.

Re: Multithreading in perl
by zwon (Abbot) on Jul 20, 2011 at 13:59 UTC

    Also you can get binary perl distribution. Most Linux distribution provide perl built with threads support. Or you can get ActivePerl

      Am using ActivePerl on Windows XP. Would i be able to download Activeperl for windows that is pre-built with multithreading support?

        ActiveState Perl, at least on Windows, always has thread support built in.

        I somewhat doubt that it's possible to compile Perl without thread support on Windows, but certainly, ActiveState is not doing that.

Re: Multithreading in perl
by Anonymous Monk on Jul 21, 2011 at 14:42 UTC
    You also need to do some reading about exactly how Perl implements threading ... what threading "means to Perl," so to speak.