Unanswered: question regarding subroutine and sort function?
I have a question regarding how to use a subroutine to sort an array contains a list of strings
in this case country names.
The requirement is to pass array to subroutine by using hard reference(pointer)
I was able to passing pointer to the subroutine, but I can not figure out how
to sort the array alphabetically inside the subroutine and return sorted array and print newly sorted array out. Please give me some advises and suggestions.
my @country = ("Russia", "China", "India", "Cuba");
my $arrayptr = \@country;