On Wed, Apr 22, 2009 at 10:37 PM, Adam Kennedy
<[email protected]> wrote:
> 2009/4/23 Ken Williams <[email protected]>:
>> +1 for Schwern here. Dotted tuples, away with the silly
>> you-must-always-use-3-digits rule.
>
> What are your plans for $], and all the code everywhere that does stuff with
> it.
The semantics for turning $] into a tuple are well-defined, because
behind the scenes it already *is* a tuple. The perl docs for $] even
mention this, and they also explicitly warn against using it as a
float:
When testing the variable, to steer clear of floating point
inaccuracies you might want to prefer the inequality tests "<"
and ">" to the tests containing equivalence: "<=", "==", and
">=".
The floating point representation can sometimes lead to
inaccurate numeric comparisons. See $^V for a more modern
representation of the Perl version that allows accurate string
comparisons.
-Ken