in reply to sorting based on a list

you could also do...
my(%order); @order{qw(a z b y c x)} = (0..5); for(sort { $order{substr($a,0,1)} <=> $order{substr($b,0,1)} } @list2) + {...
I doubt this is faster than Albannach's, but it is another way.
                - Ant