in reply to Can this code be optimized further?
You could even modify this to use a HoA-type solution, e.g.(update: fixed code..still untested):for (@temp) { push @a, $_ if s/^a_//; push @b, $_ if s/^b_//; }
my %hoa; s/^([a-z])_// and push @{$hoa{$1}}, $_ for @temp;
|
|---|