title: Translate from Perl to PHP
body: <pre><code>sub numeric_p {
      local($data) = @_;
      if ($data =~ /^-?\d*\.?\d*(e\d|e-\d)?\d*$/) {
          $true;
      } else {
          $false;
      };
  }
  </code></pre>
  
  <p>How can I translate this piece of code to <code>PHP</code>? The only piece I can't translate is the piece on the 3rd line, starting with <code>if</code>.</p>
  
  <p>How can I do that?</p>