my @hits; while ( m/(?:c(a)|k(t)|k(k))/g ) { push @hits, defined $1 ? $1 : defined $2 ? $2 : $3 }