On Mon Apr 25 09:20:43 2016, c...@zoffix.com wrote:
> 
> If the programmer omits the space after the != (not equal, numeral)
> operator, the behavior of the operator changes to: [assign RHS to LHS,
> return !RHS], as can be seen from these examples:
> 
> <ZoffixW> m: say 0 != 0
> <camelia> rakudo-moar f05c77: OUTPUT«False␤»
> <ZoffixW> m: say 0 !=0
> <camelia> rakudo-moar f05c77: OUTPUT«Cannot modify an immutable Int␤
> in block <unit> at /tmp/7Z5OWfl3Go line 1␤␤»
> <ZoffixW> m: my $x = 42; say $x !=0; say $x
> <camelia> rakudo-moar f05c77: OUTPUT«True␤0␤»
> <ZoffixW> m: my $x = 0; say $x !=42; say $x
> <camelia> rakudo-moar f05c77: OUTPUT«False␤42␤»
> 
> This behaviour is confusing and probably not wanted by most
> programmers.

This is a dupe of https://rt.perl.org/Ticket/Display.html?id=121108, which is 
wrongly titled at the moment.

Reply via email to