in reply to php to perl

You could store your variables in a PHP session file, pass around the session ID and the access the PHP session with the rather aptly named PHP::Session. Failing that you could communicate via sockets (assuming you've built PHP with socket support) or even shared memory (which also has to be built with PHP).

For more info on sockets go here for PHP and here for perl, and for shared memory here for PHP and here for perl.
HTH

_________
broquaint