Perl trim decimal number

This is a function to trim a decimal number in Perl, this function did not round the number just make an sub string from the dot to the end:

Result looks like this:

we see missing positions are filled with 0 and longer numbers are trimmed.

2 thoughts on “Perl trim decimal number”

  1. Hi! I could have sworn I’ve been to this blog before but after browsing
    through some of the post I realized it’s new to me.
    Anyways, I’m definitely glad I found it and I’ll be bookmarking and checking back

Leave a Reply

Your email address will not be published.

three × five =