# This would be the same as a straight assignment, but '!=' is just a placeholder for a.n. other comparison operation. my $temp = function_with_side_effects(); $state = $state != $temp ? $temp : $state;