for (@temp) { push @a, $_ if s/^a_//; push @b, $_ if s/^b_//; }