Re wrote perl method getnouns