#!/usr/local/bin/perl

$num = <STDIN>;
chop ($num);
$x = "";
$x .= "hello";     # += is for integers
if ($x ne "goodbye" || $x eq "farewell") {
        # the previous line had two problems:
        #   the operators were numeric, not string;
        #   the or operator was bitwise, not logical.
        $result = $num eq 0 ? 43 : 0;
        # the : and third operand were missing in the
previous line
} else {
        $result = ++$num;   # can't have ++ on both sides
}
print("the result is $result\n");
