title: Running a lua program from a text file
body: <p>I've just started learning Lua, and I'm trying to get the native Lua interpreter to run a program that has been saved to a <code>.txt</code> file. I'm running Windows Vista with Lua 5.1.4.</p>
  
  <p>Perhaps I'm missing something, but the only thing my book (<em>Programming in Lua</em>) says is that <em>all you have to do to run your program is to call the interpreter with the name of the text file that contains your program</em>. Then it gives this supposedly handy piece of code:</p>
  
  <pre><code>% lua filename.lua
  </code></pre>
  
  <p>Which I can't get to work in cmd or in the Lua interpreter. Further research I've done indicates that I might need to use a </p>
  
  <pre><code>dofile("filename.lua")
  </code></pre>
  
  <p>command, but I'm not sure how to do this. Specifically, what information do I need to put in the argument? Any help you can give is greatly appreciated.</p>