Beefy Boxes and Bandwidth Generously Provided by pair Networks
Perl-Sensitive Sunglasses
 
PerlMonks  

Re^2: Issue getting value from text file and keep decimal

by jason.jackal (Novice)
on Jun 26, 2017 at 14:46 UTC ( [id://1193579]=note: print w/replies, xml ) Need Help??


in reply to Re: Issue getting value from text file and keep decimal
in thread Issue getting value from text file and keep decimal

Thank you for your reply. Notice how the first like is dropping the decimal. 900,000.00 credit in but only showing 900,000 as the balance field. Thank you
  • Comment on Re^2: Issue getting value from text file and keep decimal

Replies are listed 'Best First'.
Re^3: Issue getting value from text file and keep decimal
by toolic (Bishop) on Jun 26, 2017 at 14:54 UTC
    You may have missed my second update. It now works for me as expected when I use this code in 2 places:
    $format_main_balance = format_value(sprintf("%.2f",$main_balance +));
    DATE DESCRIPTION DEBIT CRED +IT BALANCE ====================================================================== +================== 2017-05-01 starting balance to track character cou~ 900, +000.00 900,000.00 2017-05-01 phone bill dsfsdfsfdsfsfsfsdfsfsfsfsfdf~ 300,000.00 + 600,000.00 2017-05-03 Water 100,000.34 + 499,999.66 2017-05-05 Electric Bill 900.21 + 499,099.45 2017-06-03 debit 45678901dfsf2345678901234567890dd~ 30.32 + 499,069.13 2017-06-03 12345678901234567890123456789034 + 30.98 499,100.11 2017-06-03 credit 89012345678901234567890345678901~ + 30.98 499,131.09 2017-06-03 credit dfdfd012345678901234567890345678~ + 30.98 499,162.07 2017-06-08 Food 23.00 + 499,139.07 2017-06-12 Cash 20.00 + 499,119.07
      Hi, Yes I did miss your other post - still trying to learn the message board. It works now thank you so much. I knew it was super easy and I was near, but needed the extra help. Why was the case that I needed to format the code the way you did? I am a little confused.

Log In?
Username:
Password:

What's my password?
Create A New User
Domain Nodelet?
Node Status?
node history
Node Type: note [id://1193579]
help
Chatterbox?
and the web crawler heard nothing...

How do I use this?Last hourOther CB clients
Other Users?
Others lurking in the Monastery: (9)
As of 2024-04-18 14:13 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found