Interfacing with other languages
We are not limited to just Perl. For any scripting language that has a command-line option and can process standard input, streaming it to standard output will do.
Next are three examples which use a command line scripting approach.
Perl 6
Perl 6 is now considered a new and separate language from Perl5; some see it as a reason for the decline in the latter since the syntax of the two differs markedly in some places. Perl 6, unlike Perl, is not distributed as a standard.
The favorite distribution for Perl 6 can be obtained from https://rakudo.org.
It is necessary to be able to “find” Perl 6; the command we saw earlier is a convenient method to set up a symbolic link to the binary and put it in a folder on the excuse path (on OS X, my link is perl6 -> /Applications/Rakudo/bin/perl6
, and I put it in my '$
HOME/bin'
folder):
# Check that perl6 is available julia> run(`which perl6`); /usr/local/bin/perl6...