title: how to check if a number is whole number or contains a decimal
body: <p>If a number is <code>2017</code> and I divide it by <code>4</code>, I get <code>504.25</code>.</p>
  
  <p>if the number is <code>2016</code> an I divide it by <code>4</code>, I get <code>504</code>.</p>
  
  <p>My question is, is there a way to use perl to check if a number that was divided, if the answer is a whole number and has <code>NO</code> decimal at all?</p>
  
  <p>UPDATE: I got it working from the answer I selected below. I was trying to check if this is leap year, because today my code broke, because my code ran from the cron job as set to run on the last day of every month. Typically for feb, that is the 28th, so it ran on the 28th and shut the website done for the end of month maintenance. so what I have it do now is run on both Feb 28th and Feb 29th (For if there is a 29th) and in the code, I have it check if it is leap year now like this:</p>
  
  <pre><code>my $_leapNum = 4; # Leap year is always divisible by 4 with no remainder...
  my $_NotLeapRemain = $_lTimeYYYY % $_leapNum; # I have $_lTimeYYYY built for the year only - longyear
  
  if($_NotLeapRemain) {
      my $_isLeapYear = 0;
  } else {
      my $_isLeapYear = 1;
  }
  </code></pre>
  
  <p>Then later I check if it is leap year. If it is, then I check if the day is 28th, if it is, then it just exits. If it is the 29th, then it does what it was intended to do.</p>
  
  <p>I tested it and it works perfectly now.</p>
  
  <p>Thank you for your help.
  -Rich</p>