Transpile Perl5 code to JavaScript code