title: How to make a Perl 6 script exit on Ctrl+D input?
body: <pre class="lang-perl6 prettyprint-override"><code>loop {
    my $word = prompt '&gt; ' ;
    say $word;
  }
  </code></pre>
  
  <p>What's the right way to make it <code>exit</code> if/when instead of printing a word I press Ctrl+D?</p>