in reply to annoying duplicate cookies

Perhaps you're setting the cookie each time the script is called? Why not check? Say you have a CGI object called $query. Where you set the cookie, add a test for existence:
unless (cookie('sessionID')) { my $cookie = $query->cookie(-name=>'sessionID', -value=>'xyzzy', -expires=>'+1h', -path=>'/'); print $query->header(-cookie=>$cookie); }
That's where I'll bet my dollar :)

cLive ;-)