|
|
| Perl: the Markov chain saw | |
| PerlMonks |
Re^2: How to get 2nd highest value from an array?by tweetiepooh (Hermit) |
| on Dec 14, 2005 at 10:39 UTC ( [id://516673]=note: print w/replies, xml ) | Need Help?? |
This is an archived low-energy page for bots and other anonmyous visitors. Please sign up if you are a human and want to interact.
Well the code above prints value-1 of the last element not the value of the next to last element. In an array of sequential numbers the result may be the same ie element 9 contains value 9.
So the print statement becomes ?
In Section
Seekers of Perl Wisdom
|
|
||||||||||||||||||||||||