Perl Parse String Into Array Javascript Function Parameters