erl rejects FQN that begin with a digit

Magnus Henoch <>
Wed Oct 20 13:58:09 CEST 2010


Patrick Baggett <> writes:

> This one is probably a really quick fix...
>
> Synopsis:
> It seems Erlang doesn't like domain names that start with digits, in my
> case, the domain "8fun.net"
>
> ()5> tut17:start_ping().
> * 1: syntax error before: 8

Try with single quotes around the hostname:

tut17:start_ping('').

By using single quotes, you force the parser to read the name as an
atom.

-- 
Magnus Henoch, 
  Erlang Solutions
  http://www.erlang-solutions.com/


More information about the erlang-bugs mailing list