my @subset = grep{/\.hubbba$/}@array; #update added initial regex delimiter thanks [johngg] and [1nickt]