title: Converting text MB/GB to value
body: <p>I have a variable which contains a file size:</p>
  
  <pre><code>my $tx = "41.4 MB";
  </code></pre>
  
  <p>or  </p>
  
  <pre><code>my $tx = "34.4 GB";
  </code></pre>
  
  <p>How do I go about converting this to a KB value. So if tx contains MB then * 1024, and if tx contains GB  then * 1024 * 1024?</p>