and this is the outputmy $mult=chop($mcap); my $dec=$mcap-int($mcap); if ($mcap =~ s/([^0-9.]+)\z//) { my $suf=1; die if !$multiplier{$suf}; $mcap *= $multiplier{$suf}; } print "multiplier is $mult and decimal portion is $dec and mcap is $mc +ap\n";
multiplier is B and decimal portion is 0.200000000000003 and mcap is 1 +08.2
In reply to Re^2: convert last digit in decimal
by baperl
in thread convert last digit in decimal
by baperl
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |