<on 25.05.01, Ulises Vega wrote>
> hello,
> 
> i did the following in a script in accordance to perlthrtut
> to find out the posibility to use threads and the answer was "We do not
> have threads"

probably true. 
to see what your perl was configured with do a 
perl -V

> #!/usr/bin/perl
> use Config;
> if($Config{usethreads}){
>       print "We have threads\n";
> }else{
>       print "We do not have threads\n";
> }
> 
> the quiestions are:
> 
> did i make a mistake?

Nope, it looks like your version of perl just doesn't support what you want to do.
:-)

>       how can i correct it?

You'll probably have to recompile perl and enable threads, if you have the source. Or 
maybe there is a binary for your platform...?
Are you using 5.005_3 for a particular reason?
I would probably upgrade 5.6.1. :-) 

> or How can i add threads support to my perl version (5.005_3)
answered above. :)

> 
> in another script a i wrote:
> all in the same script called thr.pl
> #!/usr/bin/perl
> use Config;
> use Thread;
> {
> $thr= new Thread \&sub1;
> }
> sub sub1 {
>        print "In the thread\n";
> }
> ~        
> 
> then i did a sintax check
> cbash-2.03# perl -c thr.pl
> Can't locate Thread.pm in @INC (@INC contains:
> /usr/lib/perl5/5.00503/i586-linux
>  /usr/lib/perl5/5.00503 /usr/lib/perl5/site_perl/5.005/i586-linux
> /usr/lib/perl5
> /site_perl/5.005 .) at thr.pl line 3.
> 
> what is the problem.

@INC is perl's module include path. It tries to find any "Foo.pm" files in the paths 
you see above.

It didn't find the Thread.pm module, as that would be part of the threaded perl 
install.

So, you'll new a shiny, (re-)compiled version of perl with threading enabled. (Or 
download a binary if you can find one for your platform). 
HTH.

--lucy


 

Reply via email to