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

Hi, people.

I have 2 questions:
1. Why this script doesnt work:

use Thread;
$t1 = new Thread(system("c:\\valeriy\\program2\\pr1.pl"));
$t2 = new Thread(system("c:\\valeriy\\program2\\pr1.pl"));

After pr1.pl finishes, it returns:
No threads in this perl at C:\Valeriy\Program2\MainPr.pl line 3.

So, pr1 works, but pr2 - doesnt. I'd like them to work parallely

2. Why when I post the message it doest appear at once? After some period of time. There are kinda moderator-administrator?

Thanks.

Replies are listed 'Best First'.
Re: 2 threads dont want to work
by acid06 (Friar) on Sep 23, 2000 at 02:36 UTC
    ActivePerl doesn't support Threading. However you can use fork(), but some people say it's kinda buggy (I never had any problems with but i only used it a couple of times). You should try using fork() and see what happens.