in reply to dependable way to test for a float
if ( $var =~ /^-?\d+(\.\d+)?$/ ){ # you have a float } [download]