http://www.perlmonks.org?node_id=994463


in reply to Find highest value

Consider:
  • read a line into an array
  • split it by whitespace
  • make a slice from the totals (the 5th, 7th, etc. element)
  • select the maximum with e.g. List::Util, use a flag is more maxes are found
  • write out the elements you need


  • Optionally the last 3 steps can be implemented in a subroutine, thus making your code more readable.


    I'm too lazy to be proud of being impatient.