my %mul = ( M => 1e6, B => 1e9, ); if ($num =~ s/([^0-9.]+)\z//) { my $suf = $1; die if !$mul{$suf}; $num *= $mul{$suf}; }
(Billion can also mean 1e12. Adjust if necessary.)
In reply to Re: convert last digit in decimal
by ikegami
in thread convert last digit in decimal
by baperl
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |