If you look at that explorer, it also shows you the data that would be sent. Your next step is to compare, step by step, the data that PHP sends with the data that Perl sends.
Then, edit your code to eliminate all the differences in the output between Perl and PHP.