@a = ( ["oops", 0], [ "happy", 2 ], [ "word", 4 ] ); foreach $ar(sort {$a->[0] cmp $b->[0]} @a) { print "$ar->[0] is $ar->[1]\n"; }