Perl Turn Array Into String Javascript Example Functions