[erlang-questions] File IO

Vlad Dumitrescu vladdu55@REDACTED
Fri May 16 23:00:39 CEST 2008


Hi,

On Fri, May 16, 2008 at 10:51 PM, Vlad12 <vsarpe@REDACTED> wrote:

> Does anyone know how to get around this, to write touples into files?
>

The docs for file:write/2 specify that the second argument is an iolist().
If you want to output a term, you will have to convert it to its printable
value with for example io_lib:format("~w", [Term]). Or instead of using
file:write/2, you can use io:format/2.

regards,
Vlad
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://erlang.org/pipermail/erlang-questions/attachments/20080516/e959ff45/attachment.htm>


More information about the erlang-questions mailing list