- Mac OS X:
brew install erlang
- Gentoo Linux:
sudo emerge erlang
$ erl
Erlang/OTP 17 [erts-6.0] [source] [64-bit] [async-threads:10]
Eshell V6.0 (abort with ^G)
1> "hello, world!".
"hello, world!"
2> q().
ok
hello.erl
main(_) -> io:format("Hello, world!\n").
Make sure you have 2 empty lines.
$ escript hello.erl
Hello, world!
-module(hello).
-export([main/1]).
main(_) -> io:format("Hello, world!\n").
$ escript hello.erl
Hello, world!
TODO - we will work this part out.