in reply to Calculated % of data greater than $x in an array
Why do you have this line in your code?
if(my $y >= 1){
Other than that, there is little to improve your code. I would sort the list first, and stop looking at the list elements once I've found the first element that is greater than my target $y, but that's it.
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re^2: Calculated % of data greater than $x in an array
by Anonymous Monk on Mar 05, 2010 at 18:15 UTC | |
by ikegami (Patriarch) on Mar 05, 2010 at 18:29 UTC | |
by BrowserUk (Patriarch) on Mar 05, 2010 at 21:44 UTC | |
by ikegami (Patriarch) on Mar 05, 2010 at 22:26 UTC | |
by JavaFan (Canon) on Mar 06, 2010 at 01:02 UTC | |
by Corion (Patriarch) on Mar 05, 2010 at 18:23 UTC |