develooper Front page | perl.beginners | Postings from January 2002

decimal point

Thread Previous | Thread Next
From:
Stuart Clark
Date:
January 28, 2002 00:44
Subject:
decimal point
Message ID:
001c01c1a7d7$ee120490$b945a4cb@yogi
Hi,
I am trying to move the decimal point 2 places to the the left.
 
Eg : To make 4536233 into 45362.33
 
I tried this 
$total = "4536233";
$total = sprintf("%0.2f",$total);
print "$total";
But I get this
4536233.00
 
Can anyone help please
 
Regards
Stuart Clark
 

Thread Previous | Thread Next


nntp.perl.org: Perl Programming lists via nntp and http.
Comments to Ask Bjørn Hansen at ask@perl.org | Group listing | About