reading and writing text file
Sun Aug 3 01:35:49 CEST 2003
> You can either use file:read_file() and binary_to_list(), followed by
> string:tokens(List, "\n") -- which will give you a list of strings, one
> for each line of text in the file --
It works but I still get "\" added for all quoted text. For example "Hello"
becomes \"hello\". How can I get rid of these "\".
> or use io:get_line(FileDescr,'') to read one
> line at a time from the file.
What FileDesc means in this case and what do I have to put inside ''? I
just have a file "a.txt" to read and see it as a list of strings.
How to append the string "Hello Erlang" to the text file "a.txt"? I can't
find the append command.
Thank you again.
More information about the erlang-questions