<div>There is an example in <<Programming Erlang>> (Chapter 6.3):</div>
<div> </div>
<div>factorial.erl</div>
<div> </div>
<div>#!/usr/bin/env escript<br>main([A]) -><br> I = list_to_integer(A),<br> F = fac(I),<br> io:format("factorial ~w = ~w~n" ,[I, F]).<br> fac(0) -> 1;<br> fac(N) -><br>  N * fac(N-1).</div>
<div> </div>
<div> </div>
<div>However, when I execute this example, it outputs:</div>
<div>$ ./factorial 25<br>escript: script failed with error reason {function_clause,<br>                                 [{local,<br>                                   main,<br>                                   [["25","-s","cean","version"]]}]}
</div>
<div> </div>
<div>What's wrong with me ? Thank you very much.</div>