title: How can I convert a string to a float with Perl?
body: <p>Is there any function like <code>int()</code> which can convert a string to float value?
  I'm currently using the following code:</p>
  
  <pre><code>$input=int(substr($line,1,index($line,",")-1));
  </code></pre>
  
  <p>I need to convert the string returned by <code>substr</code> to float.</p>