Perlfect Solutions
 

[Perlfect-search] Search scores in percents

Daniel Naber dnaber@mini.gt.owl.de
Mon, 21 Aug 2000 18:41:09 +0200
On Mon, 21 Aug 2000, you wrote:

>         my $score = sprintf "%.2f%%", $answer{$_};

You can do this and check if the value is > 100, if it is: $score = 100; 
(not a clean solution). 

The right way would be to go throw all the values in %answer and find the 
biggest one. Then you can calculate a factor that's necessary to make the 
biggest one 100 and multiply every value with this factor.

Regards
 Daniel