Do not type it in Erlang shell but use variable bound to Port. #Port<0.11255> is a way how Erlang visualize Port value but it is not a Port value. You can't make Port from "#Port<0.11255>" which is what Erlang shell received from your keyboard. You have to use what Erlang shell received from (erlang:)open_port/2 and then transformed to "#Port<0.11255>" and sent to IO server which shows it to the terminal. You have to bound it to the variable or use v(N) pseudofunction.