in reply to Numeric as hash key returns undef...
which perl is interpreting as:$foo = $hash{5.00};
What you want is this:$foo = $hash{5};
To further illustrate, check what the following code does:$foo = $hash{'5.00'};
$hash{5} = "foo"; $hash{'5.00'} = "bar"; print $hash{5}, $hash{5.00}, $hash{'5.00'};
|
|---|