At 03:50 PM 1/28/00 -0800, Shanks, Jon wrote:
>if (system($cmd) != "\"inspected\"") {
> print STDERR "Accepted\n";
> exit $ACCEPT;
> }
>else {
> print STDERR "Rejected\n";
> exit $REJECT;
>}
>My problem is that the system($cmd) call doesn't return the actual attribute
>value. When I check that value I get 0 no matter if the attribute is set on
$out = `cleartool blah blah ....`
if ($out ne "inspected")
Note these are backticks. system() returns 0 on success and a nonzero
value otherwise - it doesn't return the output of the command. Use
backticks to capture the output. Also, != is for numeric comparison, ne is
for string comparison.
Brandon
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
This archive was generated by hypermail 2b29 : Sun May 06 2001 - 00:22:42 EDT