Help for this page

Select Code to Download


  1. or download this
    86902
    .50
    2.
    165.0
    0.666666666
    
  2. or download this
    86902.00
    0.50
    2.00
    165.00
    0.66
    
  3. or download this
    # if value is '#' then append ".00"
    $curr .= ".00" if $curr =~ m/^\d+$/;
        
    ...
        
    # if necessary, truncate to 2 decimal places
    $curr =~ s/^(\d+\.\d{2})\d+$/$1/;