> -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
[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
$? 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
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