in reply to php arrays to perl
You probably want to use a hash in Perl, not an array.
my %data = ( text1 => 'text', text2 => 'tes1', text3 => 'tes2', ); [download]
Also, your PHP syntax is wrong. Those colons should be => like in Perl.