String to term

Bengt Kleberg (AL/EAB) <>
Wed Apr 27 15:03:49 CEST 2005

Inswitch Solutions - Erlang Evaluation wrote:
> Hi,
> Does someone know if there is an easy way to convert a string to an Erlang
> term?
> example:
> "{1,2,[hello]}" ---- converted to ----->  {1,2,[hello]}

do you have a file system? if so, write the string to a file, and the 
use file:path_consult/2.

or have a look in the file module to see what path_consult/2 does. it 
should be handling strings somewhere along the line.

it would be nice if erlang had strings ports.


-------------- next part --------------
An HTML attachment was scrubbed...
URL: <>

More information about the erlang-questions mailing list