title: How can I clear EOF on stdin ($*IN) after gettig it with get / prompt in Raku?
body: <p>In my program, I'd like to read a line from <code>$*IN</code> in a loop, and for this I can use either <code>get</code> or <code>prompt</code>; however, I noticed that if I end my input immediately with EOF (e.g., with Ctrl-D in Linux / MacOS) then any subsequent uses of <code>get</code> or <code>prompt</code> for reading another line from <code>$*IN</code> will cause it to return <code>Nil</code>, meaning it still gets EOF from <code>$*IN</code>.</p>
  <p>Example:</p>
  <pre><code>dd get;
  dd get;
  </code></pre>
  <p>with an immediate EOF (ctrl-d), the program ends and outputs two <code>Nil</code>'s.</p>
  <p>This problem doesn't happen if something is entered other than just a EOF.</p>
  <p>Curiously, this problem also doesn't happen with <code>slurp</code>. I.e.,</p>
  <pre><code>dd slurp;
  dd slurp;
  </code></pre>
  <p>After the first ctrl-d, <code>&quot;&quot;</code> is printed by the first <code>dd</code> and then it waits for input due to the second <code>slurp</code>.</p>
  <p>I think this is also them same problem with - <a href="https://github.com/rakudo/rakudo/issues/4196" rel="noreferrer">https://github.com/rakudo/rakudo/issues/4196</a></p>