RE: perl if/then

2008-09-04 Thread Stewart Anderson
> -Original Message- > From: Dr.Ruud [mailto:[EMAIL PROTECTED] > Sent: 04 September 2008 10:11 > To: beginners@perl.org > Subject: Re: perl if/then > > [EMAIL PROTECTED] schreef: > > > if ($host eq $hostname) > > {next;} > > {$cmd="/us

Re: perl if/then

2008-09-04 Thread Dr.Ruud
[EMAIL PROTECTED] schreef: > if ($host eq $hostname) > {next;} > {$cmd="/usr/bin/rdist $args $srcdir ${host}:$destdir 2>&1";} > else > {$cmd="/usr/local/bin/scp $scpargs $srcdir ${host}:/ 2>&1"; } That if has 2 blocks. -- Affijn, Ruud "Gewoon is een tijger." -- To unsubscribe, e-mail

Re: perl if/then

2008-09-03 Thread Raja Vadlamudi
$? Is a child error status and it works in perl too. Try to print it out and see what it says. On 9/3/08 3:43 PM, "[EMAIL PROTECTED]" <[EMAIL PROTECTED]> wrote: > I have a script in which I distribute directories to host. I use > either rdist or scp based on their OS. For example older sun mac

perl if/then

2008-09-03 Thread littlehelphere
I have a script in which I distribute directories to host. I use either rdist or scp based on their OS. For example older sun machines need rdist while newer machines can use scp. For some reason the function below only resorts to scp. what I would like to do is an if/ then statement. I know in