A quick question, just to save my hairy ass at work:
How do I find the median value from a file(or array) in perl.
More precisely, if there are n items in a ordered list and n is odd, there is a single median at location (n+1)/2-1. If n is even, there are two medians at locations n/2-1 and n/2.
But how does one distinguish if a value is odd or even under perl? Is there an algorithm to divide the number of values by two and see if the result is a fraction or not?