As previous posts have mentioned, floating point numbers are only stored in a limited precision. If your number can be written in a binary non-repeating decimal , your ok, but for repeating floating point numbers in binary way, some accuracy is lost. For example, 1/4th can be written as a binary non-repeating decimal, (1/4 = 0.01 binary), but 1/5th is repeating in binary form (1/5 = 0.00110011...) and will get truncated. This means that for a computer, 1/5 is not 0.2!
The important lesson is that you should never (I mean it!) compare floating point numbers for equality. By the way, this goes for most programming languages.
To solve your problem, write the numbers as a formatted string wide enough, and compare those. For example:
my $val1 = 17554.61 - 2194.33;
my $val2 = 19748.94;
my $val1_str = sprintf("12.2f", $val1);
my $val2_str = sprintf("12.2f", $val2);
print ("equal\n") if ($val1_str eq $val2_str);