title: How to split a file while keeping punctuation AND whitespace?
body: <p>I have an input file named <code>input.txt</code>. Its content:</p>
  
  <blockquote>
    <p>Sometimes, Perl's getting on my nerves</p>
  </blockquote>
  
  <p>When I call <code>grep -Eo '\w+|[^\w ]' input.txt</code>, I get this output:</p>
  
  <pre><code>Sometimes
  ,
  Perl
  '
  s
  getting
  on
  my
  nerves
  !
  </code></pre>
  
  <p>However, I would like to keep each whitespace as well, meaning that I'd like to get this:</p>
  
  <pre><code>Sometimes
  ,
  
  Perl
  '
  s
  
  getting
  
  on
  
  my
  
  nerves
  !
  </code></pre>
  
  <p>How should I improve my <code>grep</code> to achieve what I want?</p>