programming-examples/perl/Datatype/A program that contains a floating-point comparison.pl
2019-11-15 12:59:38 +01:00

10 lines
207 B
Perl

#!/usr/local/bin/perl
$value1 = 14.3;
$value2 = 100 + 14.3 - 100;
if ($value1 == $value2) {
print("value 1 equals value 2\n");
} else {
print("value 1 does not equal value 2\n");
}