[erlang-questions] Problems in a list
Thu Aug 16 13:27:08 CEST 2007
On 8/16/07, Prabhuram K <> wrote:
> Hello all,
> I am a newbie to erlang.
> I have a value of this format "\"srs1\",\"srs2\"". If I do a list_to_atom on
> this I get '"srs1","srs2"', that is within single quote. So if I store it as
> [SrsNameList] it is stored as ['"srs1","srs2"']. I don't need the single
> quote, it should just be ["srs1","srs2"]. How do I do that ?
There are no single quotes in the atom name. The single quotes you see are
part of the syntax of atoms.
Look at this:
Note that atoms once created are never deleted and that only a
limited number of them can be created. So it's not a good idea to
apply list_to_atom to random lists.
More information about the erlang-questions