title: How can I do a multi-line match on the data returned from Perl's diamond operator
body: <p>Is there some trick to do multi-line regular expression matches with <code>&lt;&gt;</code>, and loop over them? This example results in no matches when run on files with <code>\n</code> as the newline separator:</p>
  
  <pre><code>while (&lt;&gt; =~ m/\n./) {
    print($.);
  }
  </code></pre>
  
  <p>I need to know the line of the start of the match inside the <code>while</code> loop, as in the example.</p>
  
  <p>The goal is to find all lines which have less than 75 characters which are followed by a line starting with a space (the standard vCard way of splitting long lines):</p>
  
  <pre><code>while (&lt;&gt; =~ m/(^|\n).{0,74}\n /)
  </code></pre>