If this is likely to be a large amount of data, one way to pass it from PHP to Perl would be to create a data file named according to IP or session code and then pass the session code to Per as an argument (see exec). This is probably the easiest method. Depending on what the Perl script does, however, it might be simpler to rewrite it in PHP rather than messing around with transferring back and forth between the two. I often write my first and second drafts in Perl and then translate to PHP once I have a handle on what I'm trying to do.