in reply to How to get 2nd highest value from an array?

doesn't take into account short (or string/custom sorts) lists, but as a starting point:
my @arr = qw/ 1 9 8 7 6 2 3 4 5/; print ( (sort @arr)[-2] );