in reply to Sorting the numbers: A little tricky.
Like everyone else, it is hard to understand the math. But your original question can be answered by reading the file one line at a time, do a 'chomp' and then 'split' the line into 2 strings. Then using a hash, populate it with keys and values where the value is greater than 4.
Now you can process your hash using a 'foreach' with a numeric 'sort' of the 'keys' of the hash, and use whatever Perl math code you want to get whatever results you want.
Like all things in Perl, this is one of many ways to do it, so experiment.
Good Luck
"Well done is better than well said." - Benjamin Franklin
|
|---|