#The result of the equality check is used in "boolean context" if ($foo ne $bar) { print "Mismatch!"; }; #The result of the equality operator is used in "other context": my $diff_start = ($foo ne $bar); #The result of the equality operator is also used in "other context": if (my $diff_start = ($foo ne $bar)) { print "Mismatch after $diff_start"; };