in reply to How do I sort something alphabetically?

use strict; my @list = qw(b d e c a f g w i l z x p o q s); print sort @list; print "\n\n"; jptxs:/home/jptxs $ perl -w alpha abcdefgilopqswxz jptxs:/home/jptxs $
Basically, see sort - a function which will sort on any given criteria that defaults to sorting alphabetically for strings, or numerically for numbers (duh).

Originally posted as a Categorized Answer.