On 10/15/18 9:04 AM, Larry Wall wrote:
On Sun, Oct 14, 2018 at 02:03:23AM -0700, ToddAndMargo via perl6-users 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

This almost certainly means that $ReturnStr is a read-only paramater to
a routine.  Add "is copy" to the declaration if you want to modify it.

Larry


Hi Larry,

I am not seeing it.

:'(

-T


sub RunNoShellAll( Str $RunString, Int $StdOut, Int $StdErr, Int $Code ) {
...
   my Str $ReturnStr = "";
...
   if  $StdOut  { $ReturnStr = $$proc.out.slurp-rest; }

Reply via email to