title: Perl three dot operator ... examples
body: <p>Can anybody show with some examples the exact difference between <code>..</code> and <code>...</code> operator?</p>
  
  <p>From the <a href="http://perldoc.perl.org/perlop.html">perlop</a> man page:</p>
  
  <blockquote>
    <p>If you don't want it to test the right operand until the next
    evaluation, as in sed, just use three dots ("...") instead of two.</p>
  </blockquote>
  
  <p>But what exactly this mean? I don't understand the perlop's example:</p>
  
  <pre><code>@lines = ("   - Foo",
            "01 - Bar",
            "1  - Baz",
            "   - Quux"
  );
  foreach (@lines) {
      if (/0/ .. /1/) {
          print "$_\n";
      }
  }
  </code></pre>
  
  <p>with <code>...</code> will print the <code>Baz</code> - but why? More precisely, why is <code>Baz</code> not printed with two dots and only with <code>...</code>?</p>