#!/usr/bin/perl use strict; use warnings; use Test::More qw(no_plan); my $x1 = 44.7; my $x2 = 44.9-0.2; is($x1,$x2, "44.7 is 44.9-0.2"); #succeeds. because is uses the eq operator... cmp_ok($x1,'==',$x2, "44.7 == 44.9-0.2"); # fails. but the diagnostic isn't real helpful.