It IS pretty simple: the "cmp" operator that you've already quoted. Your example is complicated because you spend 2 lines eliminating non-word characters and underscores, but without that it can reduced to:
@temp = sort {lc($a) cmp lc($b)} @temp;
How simple is that? :-D
Gary Blackburn
Trained Killer