$accountBalance = $startingBalance - $balanceEntryAmount;
This means that every time you press this line, you set the current balance to the original balance minus the amount of input. You probably want to assign before the while loop:
# or just rename $startingBalance to $accountBalance
$accountBalance = $startingBalance;
and then in the while loop
$accountBalance = $accountBalance - $balanceEntryAmount;
Of course, you will also have to fix another branch of your conditional.
, - , - .