I am running code from the book programming in Lua... http://www.lua.org/pil/3.6.html
when I run this code in the terminal interpreter... it continues reading input forever...
list = nil
for line in io.lines() do
list = {next=list, value=line}
end
Ctrl C returns me to the prompt/bash. Is there another command to break? How do I break/return from a chunk of lua code without exiting the interpreter?
You can indicate the end of input for stdin by using either Ctrl-Z or Ctrl-D.