Why?? Thanks again.my $batch_total = 297; my $batch_sign_indicator = '-'; my $close_response; $close_response->{batch_net_amount} = -2.97; #this code doesn't work. it returns false my $test_batch_amount = ($batch_sign_indicator eq '-') ? ((0 - $batch_ +total) / 100) : ($batch_total / 100); if($test_batch_amount == $close_response->{batch_net_amount}){ print "good!!! $test_batch_amount == $close_response->{batch_net_a +mount}"; } else{ print "no good $test_batch_amount == $close_response->{batch_net_a +mount}"; } ####THIS CODE DOES WORK AS EXPECTED AND RETURNS TRUE my $test_batch_amount = ($batch_sign_indicator eq '-') ? ((0 - $batch_ +total)) : ($batch_total); if($test_batch_amount == ($close_response->{batch_net_amount}*100)){ print "good!!! $test_batch_amount == $close_response->{batch_net_am +ount}"; } else{ print "no good $test_batch_amount == $close_response->{batch_net_am +ount}"; }
In reply to inequality of appearing same number by bear0053
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |