Call the 'exec' in your scripts please.for example,you want to execute three 
system commands: call0,call1,call2,you could write:

for (my $i=0;$i<3;$i++){
    die "can't fork $!" unless defined my $child = fork();
    unless ($child){
        exec "call$i";
        die "can't exec call$i";
    }
} 

Also see 'perlcoc -f exec' and 
perldoc -q 'How do I start a process in the background?'




-----Original Message-----
>From: Saurabh Singhvi <[EMAIL PROTECTED]>
>Sent: Mar 4, 2006 9:21 AM
>To: Perl FAq <beginners@perl.org>
>Subject: multiple system commands
>
>Hi
>
>I have a script which executes some system commands one after the other. But
>
>as can be seen from what is written the limitation is that they are executed
>one
>after the other. Now, I want them to run simultaneously. So, how should i go
>about
>doing it??
>
>thanks
>Saurabh


--
Jeff Pang
NetEase AntiSpam Team
http://corp.netease.com

-- 
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
<http://learn.perl.org/> <http://learn.perl.org/first-response>


Reply via email to