|Perl Monk, Perl Meditation|
Results depending on evaluation orderby fishy (Pilgrim)
|on Apr 23, 2014 at 16:30 UTC||Need Help??|
fishy has asked for the
wisdom of the Perl Monks concerning the following question:
I was trying the code from Okay! What!?!?!?
and from My floating point comparison does not work. Why ?
when I came up with the following behavior (tested on Perl 5.10.1 and on 5.18.2):
Swapping operands on the first sample code:
Using eval on the second sample code:
So, I got odd results depending on the order of the operands and right results on evaluating.
How can that be?