[erlang-questions] running file from win prompt?

Martin Gignac martin.gignac@REDACTED
Mon Jun 23 19:16:08 CEST 2008


> if i have mymath.erl in usr and want to run it from the windows command
> prompt and not the shell.
> how do i compile and run?

There's two choices:

1. You must first compile (unlike Perl, Python or Ruby) it with erlc,
and then run it by feeding it as an argument to erl:

http://www.erlang.org/doc/man/erl.html

2. However, if it's a small script you might want to use the escript
method instead (you don't have to compile for that):

http://www.erlang.org/doc/man/escript.html

That second method is more like people are used to with Perl, Python and Ruby.

-Martin



More information about the erlang-questions mailing list