example/perleval.pl - Erlang::Port example
example/$ erl 1> perleval:start("perl -Mblib perleval.pl"). #Port<0.94> 2> perleval:eval("1+2"). 3
Example for Erlang::PerlPort.
Start script in an erlang external port. Default is "perleval.pl".
Stop port.
eval $String in perl interpreter.
set Object into $VarName in perl.
1> perleval:start("perl -Mblib perleval.pl"). #Port<0.94> 2> perleval:eval("1+2"). 3 3> perleval:set(var, [{a,3}, {b,4}]). [{a,3},{b,4}] 4> perleval:eval("$var->{a} * $var->{b}"). 12 5> perleval:eval("$var"). [{a,3},{b,4}]
Erlang::Port
To install Erlang::Port, copy and paste the appropriate command in to your terminal.
cpanm
cpanm Erlang::Port
CPAN shell
perl -MCPAN -e shell install Erlang::Port
For more information on module installation, please visit the detailed CPAN module installation guide.