When we have a non quoted word before the operator => we only can guarantee that this word won't be interpreted as a sub even when this sub exists. This doesn't mean that a number will be turned into a string, so, this is also valid:
%h = ( 1.000 => 'foo' ) ; print "value: $h{1}\n" ;
What make this valid:
$h{2.000} = 'bar' ; print "value: $h{2}\n" ;
What have nothing to do with the operator =>.

Graciliano M. P.
"Creativity is the expression of the liberty".


In reply to Re: Use of the => operator by gmpassos
in thread Use of the => operator by roju

Title:
Use:  <p> text here (a paragraph) </p>
and:  <code> code here </code>
to format your post; it's "PerlMonks-approved HTML":