in reply to Can this code be optimized further?

This solution is more golfish than fast. (Anyone care to benchmark it?)
eval join '', map /(.*)_(.*)/ ? "push \@$1,'$2';" : (), @temp;
Here's another which is shorter but perhaps slower, since it does many evals instead of one:
/(.*)_(.*)/ && eval "push \@$1,'$2'" for @temp;