my @a = ('x', 'z', 'y'); my @sorted = sort(@a); print join(',', @sorted);