erl rejects FQN that begin with a digit

Magnus Henoch magnus@REDACTED
Wed Oct 20 13:58:09 CEST 2010


Patrick Baggett <baggett.patrick@REDACTED> 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"
>
> (host1@REDACTED)5> tut17:start_ping(host2@REDACTED).
> * 1: syntax error before: 8

Try with single quotes around the hostname:

tut17:start_ping('host2@REDACTED').

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

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


More information about the erlang-bugs mailing list