Running scripts
After getting familiar with the basics of the language you may want to try writing simple programs. This can be accomplished by putting the following Elixir code into a file:
IO.puts "Hello world from Elixir"
Save it as simple.exs
and execute it with elixir
:
$ elixir simple.exs
Hello world from Elixir
Later on we will learn how to compile Elixir code (in Chapter 8) and how to use the Mix build tool (in the Mix & OTP guide). For now, let’s move on to Chapter 2.