<cfscript>

	echo( "<h1> Using CFLoop </h1>" );

	// Instead of using FileOpen(), and explicitly reading lines and closing files when
	// we're done, we can defer all of the heavy-lifting to ColdFusion itself. The CFloop
	// tag encapsulates all of that logic!
	loop
		index = "nameIndex"
		item = "name"
		file = "./names.txt"
		charset = "utf-8"
		{

		echo( "#nameIndex# : #name# <br />" );

	}

</cfscript>