title: (m/regexp/) or {multiple ; commands; after; or; }
body: <p>I like very much this syntax:</p>
  
  <pre><code>try_something() or warn "Cant do it"; 
  </code></pre>
  
  <p>How can I add more commands after <code>or</code>?</p>
  
  <p>For example it would be useful in this code:</p>
  
  <pre><code>foreach (@array)
  {
     m/regex/ or {warn "Does not match"; next;}  # this syntax is wrong
     ...
  }
  </code></pre>
  
  <p>One way I found is</p>
  
  <pre><code>try_something() or eval {warn "Can't do it"; next;}; 
  </code></pre>
  
  <p>but I think it is bad idea.</p>
  
  <p>BEST ANSWERS:</p>
  
  <ol>
  <li><code>do</code> is better than <code>eval</code>.</li>
  <li>The comma operator is even better: <code>do_smth() or warn("Does not match"), next;</code> Nota bene: parentheses are mandatory for <code>warn</code> so that <code>next</code> does not parse as one of its arguments.</li>
  </ol>