How to sort an array in perl

Sorting an array is an important function and some or most of the languages provide an in-built function perform this operation. Perl provides this in-built functionality by means of “sort” function. Using sort function of perl an array can be sorted in both ascending and descending order. Now, let’s say the given array @array and is initialized as follows: Continue reading