foreach (@array) { @pieces = split / - /; foreach (@pieces) { #then just grab the last full word # do regex stuff here. if (/(\w+)$/) { push @newarray, $1; } } }