Beefy Boxes and Bandwidth Generously Provided by pair Networks
The stupid question is the question not asked
 
PerlMonks  

Re: Find highest and lowest numerical values for columns in a file

by Marshall (Canon)
on Jun 24, 2011 at 02:36 UTC ( [id://911192] : note . print w/replies, xml ) Need Help??


in reply to Find highest and lowest numerical values for columns in a file

There is nothing wrong with sorting and then taking the first and last value for min and max. If you have a solution that is working for you, then I am not sure what your question is.

I don't see a question specific to Perl in your post. If you want to write a Perl program to do this, here are some hints: Perl operates easiest on rows. In a recent post Re: how to loop through many arrays, I show how to transpose the columns into rows (takes 4 lines of code). List::Util has min and max functions.

  • Comment on Re: Find highest and lowest numerical values for columns in a file