in reply to Re: convert last digit in decimal
in thread convert last digit in decimal

thanks ikegami, this isn't working though.... here's what I have
my $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";
and this is the output
multiplier is B and decimal portion is 0.200000000000003 and mcap is 1 +08.2

Replies are listed 'Best First'.
Re^3: convert last digit in decimal
by ikegami (Patriarch) on Aug 10, 2011 at 22:34 UTC
    Then I recommend you use the code I posted.