in reply to Re^3: Upper case and chomp
in thread Upper case and chomp

Still bad. After the first pass, there is nothing left to chomp. You need to add my @words = @words; to the start of both functions.