foreach $i(@splitted){ if ($i=~/\b\w{6}\b/ and $i !~/\_/){ $acc=$i;