<html>
<head>
<style><!--
.hmmessage P
{
margin:0px;
padding:0px
}
body.hmmessage
{
font-size: 12pt;
font-family:Calibri
}
--></style></head>
<body class='hmmessage'><div dir='ltr'>Not sure if there's another way...<div><br></div><div><div>List = "[1,2,3,4]". </div><div><br></div><div>{ok,T,_} = erl_scan:string(String++".").</div><div><br></div><div>{ok,A} = erl_parse:parse_exprs(T). </div><div><br></div><div>{value,Value,_} = erl_eval:exprs(A, erl_eval:new_bindings()).</div><div><br></div><div>Value.</div><div>[1,2,3,4]</div><div><br></div><br><div>> Date: Fri, 21 Feb 2014 03:05:53 -0800<br>> From: ponmuthu.m@thomsonreuters.com<br>> To: erlang-questions@erlang.org<br>> Subject: [erlang-questions] help me to read proper input from commandline erl<br>> <br>> hi all,<br>> <br>> while get runtime command prompt variable via init:get_argument(name).<br>> <br>> <br>> i want to get a list . but in that " " are added while getting & assign<br>> to a varaible<br>> <br>> <br>> % erl -mylist [1,2,3,4]<br>> <br>> > {ok,[[List|_]|_]} = init:get_argument(mylist).<br>> {ok,[["[1,2,3,4]"]]}<br>> >List.<br>> "[1,2,3,4]"<br>> <br>> <br>> <br>> but expecting O/p as<br>> <br>> >List.<br>> [1,2,3,4]<br>> <br>> <br>> please help , because of this double qutoes am not able to do Head & Tail .<br>> <br>> <br>> <br>> <br>> --<br>> View this message in context: http://erlang.2086793.n4.nabble.com/help-me-to-read-proper-input-from-commandline-erl-tp4655367.html<br>> Sent from the Erlang Questions mailing list archive at Nabble.com.<br>> _______________________________________________<br>> erlang-questions mailing list<br>> erlang-questions@erlang.org<br>> http://erlang.org/mailman/listinfo/erlang-questions<br></div></div> </div></body>
</html>