I doubt this is faster than Albannach's, but it is another way.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) + {...
In reply to Re: sorting based on a list
by suaveant
in thread sorting based on a list
by mbond
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |