Sorry about not pasting the code in; but try this and see if this will work for
you.
use Config;
use threads;
# Build an array of VBS Scripts here...
# This is not tested and may not work, but you get the idea.
my @vbsScripts = ("open_test.vbs 1", "open_test.vbs 2");
$Config{useithreads} or die "Recompile Perl with threads to run this program\n";
if ( $Config{useithreads} ) {
printf("THREADED\n");
} else {
printf("NOT threaded\n");
}
# Loop through the VBS Scripts, spawn a new thread, detach that thread and
# begin code execution at sub1
foreach my $vbsScript (@vbsScripts) {
$thread = threads->create(&sub1,$vbsScript);
# Detach each thread
$thread ->detach();
}
exit(0);
###### SUBROUTINES #########
sub sub1 {
my ($vbsScript) = @_;
printf("Processing $vbsScript\n");
system("cscript $vbsScript");
}
________________________________________
From: Collins, Ellen (RSCH) [mailto:[EMAIL PROTECTED]
Sent: Tuesday, June 20, 2006 9:06 AM
To: [email protected]
Subject: question
I am running perl.5.8.7.
My script is attached. It does not run asynchronously. The commands execute one
at a time.
Does this work on windows? I am using windows 2000.
Any help is much appreciated since I have spent much time on this problem.
THANKS!
<<test2.pl>>
___________________________________________
Ellen Seebeck
Vice President
Merrill Lynch- Mortgage Research
World Financial Center, N.Y.
(212)449-1690- work
(732)681-7125- home
________________________________________
If you are not an intended recipient of this e-mail, please notify the sender,
delete it and do not read, act upon, print, disclose, copy, retain or
redistribute it. Click here for important additional terms relating to this
e-mail. http://www.ml.com/email_terms/
________________________________________