If you printf "%a\n", $v_amount; and printf "%a\n", $plbamount; (for which you need to be running perl-5.22.0 or later) you'll get to see the exact value of the 2 variables (in hex).
If they turn out to be the same && $finalamount is not zero, then you have a seriously broken perl.