in reply to Can this code be optimized further?
Here's another which is shorter but perhaps slower, since it does many evals instead of one:eval join '', map /(.*)_(.*)/ ? "push \@$1,'$2';" : (), @temp;
/(.*)_(.*)/ && eval "push \@$1,'$2'" for @temp;
|
|---|