Couple clarifications about my prior message. > And to copy into something the thing has to be a mutable container.
"mutable" and "container" are basically redundant with each other. Mutable means changeable. Container means data that has only one purpose, namely to be changeable. > that's presumably a problem with whatever code you've written that has earlier bound $ReturnStr to an immutable value. Or you need to use a fresh variable. -- raiph On Sun, Oct 14, 2018 at 10:29 AM Ralph Mellor <ralphdjmel...@gmail.com> wrote: > In P6 "assign" means use of `=`. > > And "assign to" means to copy into the thing on the left of the `=`. > > And to copy into something the thing has to be a mutable container. > > The error message is saying that $ReturnStr is bound to an > immutable value (eg a string) not a container. > > So that's presumably a problem with whatever code you've > written that has earlier bound $ReturnStr to an immutable value. > > -- > raiph > > > On Sun, Oct 14, 2018 at 10:19 AM ToddAndMargo via perl6-users < > perl6-us...@perl.org> wrote: > >> On 10/13/18 3:02 AM, ToddAndMargo via perl6-users wrote: >> > Hi All, >> > >> > if $StdOut { $ReturnStr = $$proc.out.slurp-rest; } >> > >> > gives me >> > >> > Malformed UTF-8 >> > >> > How do I clean up $$proc.out.slurp-rest ?? >> > >> > Many thanks, >> > -T >> >> This does not work: >> >> if $StdOut { $ReturnStr = $$proc.out.slurp-rest( enc => 'utf8-c8' ); } >> >> Can not assign to an immutable value >> >