my @letter=('A'..'Z'); @rand=''; foreach(0..7){ $rand.=$letter[rand(@letter)]; Then I get the user to enter a word split it into an array. This is where I get stuck. for($count=0; $count<= ($wordLength - 1); $count++){ if($wordArray[$count] =~ /[$rand]/o{