in reply to not able to get last index of array

$ perl -e 'print ((sort {$a <=> $b} 15,5,7,3,9,1,20,13,9,8,15,16,2,90, +6,12)[-1])' 90
Please also note that there are more efficient ways than sorting to find the max of a list or an array.