# New Ticket Created by  Aleks-Daniel Jakimenko-Aleksejev 
# Please include the string:  [perl #131362]
# in the subject line of all future correspondence about this issue. 
# <URL: https://rt.perl.org/Ticket/Display.html?id=131362 >


Code:
my $x; $x = 50; 42 = $x

Result:
Cannot modify an immutable Int
  in block <unit> at -e line 1


So which one of the assignments actually failed (both are on the same line)?

This bug report is motivated by this thinkperl6 exercise:

• We’ve seen that $n = 42 is legal. What about 42 = $n?

I think a good error message would be “Cannot modify an immutable Int (42)”, or 
whatever else which includes the value itself.

Reply via email to