# iterator sort { $a cmp $b } @array; # callback sub myFunc { $a cmp $b } sort myFunc @array;