Sorry if this has been asked before but I couldn't find it when looking. I found questions about multiple consecutive spaces but I'm only dealing with singular spaces here.

My code:

Code:
test {
  var %x = 1, %toSend
  while (%x <= $len($1-)) {
    %toSend = %toSend $+ $mid($1-,%x,1)
    inc %x
  }
  say %toSend
} 


when i type:

/test one two three four

it says:

onetwothreefour

Why aren't the spaces added inside the %toSend variable during the while loop? Is there another way of doing this?

Thanks.