Gossamer Forum
Home : General : Perl Programming :

truncate without rounding

Quote Reply
truncate without rounding
How would I truncate a number to the thenths without it rounding up? For instance the number 9.18 ===> 9.1
Quote Reply
Re: truncate without rounding In reply to
I'll answer my own question:

int( 10*$number)/10;