Maybe your looking to start them in the background using & at the end of your command like such:
`cd $setiathome1_dir; ./setiathome -proxy 192.168.1.3:5517 &`; and `cd $setiathome2_dir; ./setiathome -proxy 192.168.1.3:5517 &`; , since I think that the first sub you have is waiting for the command to finish before running the second one. Not sure if this is the Perl way of solving this, bit it's the shell way of doing it so... PPL: Let me know if there is a better way to do this one.... ;) I.e. a Perl way.. ;) Best Regards Anders Holm Critical Path Technical Support Engineer ---------------------------------------------------------------------- Tel USA/Canada: 1 800 353 8437 Tel Worldwide: +1 801 736 0806 E-mail: [EMAIL PROTECTED] Internet: http://support.cp.net -----Original Message----- From: Tyler Longren [mailto:[EMAIL PROTECTED]] Sent: 18 June 2002 17:08 To: Perl List Subject: Moving on.... Hello, I have an smp machine that I want to run two instances of setiathome on. I have two s@h directories (/root/.setiathome and /root/.setiathome2). I wrote this to run both of them at the same time right from one script. If I use the -a flag to run both of them, it never moves on to start the setiathome in $setiathome2_dir. How can I make it so both s@h clients get started? ----Begin Code---- #!/usr/bin/perl -w use strict; use Getopt::Std; getopts("12a", \my %options); sub usage { print "Usage: ./seti.pl [-1] [-2] [-a] -1 : Start the first directory of setiathome -2 : Start the second directory of setiathome -a : Start both setiathome clients\n\n"; } my $setiathome1_dir = "/root/.setiathome/"; my $setiathome2_dir = "/root/.setiathome2/"; sub setiathome1 { `cd $setiathome1_dir; ./setiathome -proxy 192.168.1.3:5517`; } sub setiathome2 { `cd $setiathome2_dir; ./setiathome -proxy 192.168.1.3:5517`; } if (defined $options{1}) { setiathome1; exit; } elsif (defined $options{2}) { setiathome2; exit; } elsif (defined $options{a}) { setiathome1; setiathome2; exit; } else { usage; exit; } -----End Code---- If a better explanation is desired, e-mail me directly. Thanks, -- Tyler Longren Captain Jack Communications [EMAIL PROTECTED] www.captainjack.com -- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] -- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]