Help for this page

Select Code to Download


  1. or download this
     my $amount = 35784.45;
     $amount *= 100;
     print $amount, "\n"; # gives 3578445
     print int($amount); # gives 3578444 (!)
    
  2. or download this
    $amount =~ s/^(\d+)\.(\d{2})$/$1$2/