Perl Create Empty Array Javascript Append Text