reading and writing text file

Jilani Khaldi <>
Fri Aug 1 23:54:58 CEST 2003


Hi All,
I have a file text "/erlang/eng.txt" and I want to read it; I have tried 
file:file_read and file:binary_to_list but the result is a file full of 
"\n".
Is there a way to get it as a list of strings?
Example:
myfile.txt has these lines:

Italy, Rome
France, Paris
England, London

Now I want to chane these lines in:

Italia, Roma
Francia, Parigi
Inghilterra, Londra

and save them in "/erlang/ita.txt"

I have tried many ways but in vain.

Thanks!

jk




More information about the erlang-questions mailing list