Beefy Boxes and Bandwidth Generously Provided by pair Networks
Your skill will accomplish
what the force of many cannot
 
PerlMonks  

Re: Find highest value

by nemesdani (Friar)
on Sep 19, 2012 at 14:10 UTC ( #994463=note: print w/replies, xml ) Need Help??


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.

    Log In?
    Username:
    Password:

    What's my password?
    Create A New User
    Node Status?
    node history
    Node Type: note [id://994463]
    help
    Chatterbox?
    [stevieb]: yeah. This is my build/test software that manipulates perlbrew/ berrybrew, and runs all unit tests of a project against all installed versions, including testing a dist against all of it's current revdeps. A lot of tests it runs for itself:)
    [stevieb]: testing the test build system, essentially

    How do I use this? | Other CB clients
    Other Users?
    Others cooling their heels in the Monastery: (6)
    As of 2017-03-26 22:12 GMT
    Sections?
    Information?
    Find Nodes?
    Leftovers?
      Voting Booth?
      Should Pluto Get Its Planethood Back?



      Results (315 votes). Check out past polls.