So I know that the basic Hello World Program (as in the one to output a string not the one designed for Erlang learning with spawn and other stuff) is as follows
-module(hello).
-export([start/0]).
start() ->
io:format("Hello, World!").
Then I run erl
>erl
type
>c(hello)
and then
>hello
For the escript version would it be this ?
#!/usr/bin/env escript
-export([main/1]).
main([]) -> io:format("Hello, World!~n").
Then
chmod u+x hello
Where hello is the filename ?
Why can I not use the same format as the module ? (main/0 and main()) ?