title: Convert bytes to MB in Perl
body: <p>I have a size in bytes. I want to convert this everytime in MB. But my code is giving the wrong answer.</p>
  
  <pre><code>sub sizeConversion {
      my $size = shift;
      return ($size / (1024 * 1024));
  }
  
  my $size = 1024;
  my $size_conversion = &amp;sizeConversion($size);
  print $size_conversion;
  </code></pre>
  
  <p>I get the output as:</p>
  
  <pre><code>0.0009765625
  </code></pre>
  
  <p>But I am supposed to get the output as </p>
  
  <pre><code>0.001024MB
  </code></pre>
  
  <p>Please help. Thanks in advance.</p>