I just want to take a string input from the user in erlang programming.
I think the function you're looking for is io:get_line/1:
io:get_line/1
1> io:get_line("enter data: "). enter data: data with spaces "data with spaces\n"