Which of the following is the correct way of sorting an array of integers in ascending order?
sort @a
sort {$1 <=> $2} @a
sort {$_[0] <=> $_[1]} @a
sort {$a <=> $b} @a
sort {$_[0] cmp $_[1]} @a
QuizBucket
© 2017 QuizBucket.org