Mauro <[EMAIL PROTECTED]> asked:
> I have a problem with my perl program because I'm not be able 
> to understand why it seems to execute both part of "or" statement.

I'm assuming you're referring to 

> system('/usr/bin/scp -qvp [EMAIL PROTECTED]:/home/clariion/cx700_perf.txt
/home/mgatt/rrd/tmp') or die "Non riesco a fare scp\n";

>From the perlfunc manpage: "The return value [of system()]is the exit
status of the program as returned by the wait call."

In this particular case, the return value will be 0 on success. This
is unlike most Perl functions where a boolean false result will indicate
a problem. To make your code work, check for the expected result code:

        system(...) == 0 or die;

HTH,
Thomas

-- 
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