[erlang-questions] Executing external commands
Mon Feb 12 14:38:59 CET 2007
Fernando Ipar wrote:
> One small question though:
> After looking at the list D, I was under the impression it would be a
> list of ASCII codes, but list_to_atom(D) exits
> with badarg. How do you get the output from that list?.
As returned from my example, the output is a deep list. This can be
used directly as a "string" with many I/O functions, but for other
functions such as list_to_atom/1 you need to call lists:flatten(D)
to get a flat list of characters (i.e., a normal string).
More information about the erlang-questions