title: How do I return nothing from a subroutine?
body: <p>I want to validate a condition before doing the next step, but only raise a warning and skip the current value instead of die-ing.</p>
  
  <p>How do I rewrite validate_me() subroutine without returning any value?</p>
  
  <p><strong>(Update)</strong> please note that the following code works as expected, it just that I want something else instead of returning 1 or 0 from validate_me() that still allow the code to behave the same.</p>
  
  <pre><code>foreach my $file ( @files ) {
      validate_me($foo, $bar, $baz) or next;
      do_something();
  }  
  
  sub validate_me {
      my ($foo, $bar) = @_;
  
      if ( $foo &gt; $bar ) {
          carp("Something goes awol");
          return 0;
      }
  
      if ( $bar != $baz ) {
          carp("Odd");
          return 0;
      }
  
      return 1; # success
  }
  </code></pre>
  
  <p>Thanks.</p>