I assume when you say the Apache config files "compare to be the same" that you mean aside from their unique server names and IP addresses.
Check the Perl for the cookie-setting code. Is the cookie domain set to the unique server name, i.e. server1.mydomain.com, or to mydomain.com? If the former, the Perl on server2 needs to use server2.mydomain.com.