

sub fudge_numbers {
  my $prec = shift;
  my $sum = 0;
  $sum += $_ for @_;
  map sprintf("%.${prec}f", $_*100/$sum), @_;
}
