Anonymous Monk has asked for the wisdom of the Perl Monks concerning the following question:
So value 1 is 14.4 and value 2 is 14.4, why is this evaluating to false?? Maybe I'm crazy.
my $value1 = 14.4; print "value1 = $value1\n"; my $value2 = 10 + 14.4 - 10; print "value2 = $value2\n"; if ( $value1 == $value2 ) { print "value 1 equals value 2\n"; } else { print "value 1 does not equal value2\n"; }
|
---|
Replies are listed 'Best First'. | |
---|---|
Re: Okay! What!?!?!?
by davido (Cardinal) on Apr 23, 2014 at 06:26 UTC | |
by tobyink (Canon) on Apr 23, 2014 at 11:27 UTC | |
by tye (Sage) on Apr 23, 2014 at 14:32 UTC | |
by davido (Cardinal) on Apr 23, 2014 at 14:11 UTC | |
by trizen (Hermit) on Apr 23, 2014 at 14:45 UTC | |
by karlgoethebier (Abbot) on May 01, 2014 at 14:36 UTC | |
Re: Okay! What!?!?!?
by soonix (Canon) on Apr 23, 2014 at 07:09 UTC | |
Re: Okay! What!?!?!?
by Anonymous Monk on Apr 23, 2014 at 02:14 UTC | |
Re: Okay! What!?!?!?
by LanX (Saint) on Apr 23, 2014 at 00:47 UTC | |
by awohld (Hermit) on Apr 23, 2014 at 00:53 UTC | |
by LanX (Saint) on Apr 23, 2014 at 01:22 UTC | |
Re: Okay! What!?!?!?
by sundialsvc4 (Abbot) on Apr 23, 2014 at 02:09 UTC | |
by moritz (Cardinal) on Apr 23, 2014 at 05:10 UTC | |
by Anonymous Monk on Apr 24, 2014 at 02:25 UTC |
Back to
Seekers of Perl Wisdom