Take a list of characters, sort it, and output the result in columns:
> echo 'a b c d e f g h i j k l m z x y' | ./3columnprint.pl ◼
a g m
b h x
c i y
d j z
e k
f l