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-users@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
>

Reply via email to