in reply to Inane question

Well, unless you really need to remind yourself that you're sorting lexically, drop the sort sub -- lexical is the default sort:
#!/usr/local/bin/perl -w use strict; my @data = (<DATA>); print "Naked...\n\n"; for (sort @data) { print } print "\nNow defined....\n"; for (sort {$a cmp $b} @data) { print } exit; __END__ 1 3 2 merlyn 4 10 birthday 12 9
Of course that doesn't address the "elegance" issue of the two undef values, but you already have a good answer for that :)