in reply to Passing or returnin php array to Perl
Use json. sample.php page would return json encoded string and then you should decode $response for the data structure you require.
JSON::XS is a good module to look at.