I have a script I want to run 6 instances of it simultaneously.
So I have a calling script to loop 6 times using exec to run it.
But my calling script always dies after the first loop.
I dun have the actaul script wit me now, but I tested
with something like this:
Calling script:
#!/usr/local/bin/perl
use strict;
my ($i);
print "TEST1\n";
for ($i = 1; $i <= 6; $i++) {
print "Running script $i\n";
exec "perl search2.pl $i";
print "Ran script $i\n";
}
print "TEST2\n";
search2.pl:
#!/usr/local/bin/perl
use strict;
my $engine = shift @ARGV;
if ($engine == 1) {
print "In engine 1\n";
#/* Some processing */#
print "End engine 1\n";
}
### Similar if statements for 1-6.
Output:
In engine 1
End engine 1
Anyone has any suggestions why it stops running the other instances?
And why the calling script doesn't print out its test statements?
And any suggestions how to call these instances simultaneously
(other than using fork? becos I'm not too sure how to use it... :|)
Alan Swan
---
You are currently subscribed to perl-win32-users as: [archive@jab.org]
To unsubscribe, forward this message to
[EMAIL PROTECTED]
For non-automated Mailing List support, send email to
[EMAIL PROTECTED]