use strict; use warnings; use Normalize; my @not_normalized = (0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10); my @are_normalized = @not_normalized; my $norm = Normalize->new(); $norm->normalize_to_max(\@are_normalized); printf "%.2f ", $_ foreach (@not_normalized); print "\n@are_normalized\n";