The trinary is much like any other operator, for example ==. Lets try this example,
my $result = $a == $b
Here, you get the result of the == operator, is $a equal $b. If they match it returns true, if they don't match it returns false.
The trinary works in a similar manner except you are setting the value returned instead of the implied value of other operators.
my $result = $a == $b ? 1 : 0;
This does the same thing as the first example, except you are explicitly setting the value returned. Does this help?