in reply to Perl and PHP playing together

Serialize (freeze) the data into a string that PHP can read. See the PHP docs for serialize(), in particular the user comment by scott (at) hurring.com, and the little module he's written. You'll need unserialize() in PHP, to unfreeze, and use it.