String to term

Bengt Kleberg (AL/EAB) bengt.kleberg@REDACTED
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.


bengt

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://erlang.org/pipermail/erlang-questions/attachments/20050427/ec61045b/attachment.htm>


More information about the erlang-questions mailing list