# New Ticket Created by Rob Hoelz # Please include the string: [perl #125590] # in the subject line of all future correspondence about this issue. # <URL: https://rt.perl.org/Ticket/Display.html?id=125590 >
Simliar to https://rt.perl.org/Ticket/Display.html?id=125531, but that ticket appears for more subtle reasons ($/ being modified as the result of operations like ~~). If I try to modify an ro parameter, or the parameter to a for loop (which, when using ->, I guess is another sort of ro parameter), I get one of the two error messages: sub foo(Str $str) { $str ~= 'another'; # Cannot assign to an immutable value $str .= substr(0, 3); # Cannot modify an immutable Str } I've also seen "Cannot assign to a readonly variable or a value". While the error message makes sense, it may be nice to... - Indicate the variable being assigned to, if it is indeed a variable. - (In the case of the linked ticket mentioning $/) Indicate the operation responsible for the writing - (Other than for $/) Suggest is copy or <-> if that is what the user means.