Well, in this case you'd have to leave $/ alone because there will be no spaces in your output, only newlines. There should be an extra blank line at the end of your output, right?
The replies to this suggest kill 2, $pid does indeed work on Windows.