On 07/29/2018 03:03 AM, Patrick Spek via perl6-users wrote:
You can use the head[2] sub to write it asfor @ReturnAry.head(*.elems - 3) -> $line Also, on the $ReturnStr += $Line If you're trying to concatenate a string, you should use the ~ instead of the +, so it'd become $ReturnStr ~= $Line
@ReturnAry[ 0 .. @ReturnAry.elems - 3 ] -> $Line { $ReturnStr ~= $Line ~ "\n"; } [@ReturnAry.elems - 2] is "$?" Thank you!