Hi,
You just need to convert List to a binary first with list_to_binary.
The <<"something">> syntax is just a friendly way to make binary literals. But it does not perform automatic casting of lists.
Further, the extra << >> you're wrapping around "-" is unnecessary.
Example:
> L = "123456",
> B = list_to_binary(L),
> <<B/binary,"-">>.
Will yield:
<<"123456-">>
Hope that helps.
Take it easy,
-Jesse
--
Jesse Gumm
Owner, Sigma Star Systems
414.940.4866 || sigma-star.com || @jessegumm