in reply to How can I get the four highest valued letters in an array?
I dont know if is or not considered a best practice but it works..
A semplified example will show you what I mean
perl -e "@orig=qw(A p B e C r D l);@orig=sort{ord($a)<=>ord($b)}@orig; +$#orig=3;print join ' ',@orig" A B C D
L*
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re^2: How can I get the four highest valued letters in an array?
by supriyoch_2008 (Monk) on Jun 01, 2017 at 14:56 UTC |