in reply to How to return a list using recursion?
return ( join( ' ', splice(@arr, 0, 5)) . ",\n" , _array_chunk5(@arr), ); [download]
Update: Sorry, I did not notice that this is the same as IG's solution.