in reply to Cookies In Perl

Here is code which already exists can you tell me how can I add the cookie when user changes some information in his session. As you Can see the script it does some calls to db and reloads the page setting the cookie if I want to add some value to $sessionInfo variable and change only that value i cannot. please tell me how to proceed ?
sub setCookie { use CGI qw(:standard); local $username = shift; local $password = shift; local $path = shift; my $sProjName = shift; local($sessionInfo, @UserInfo, $sql, $rec, $value, $iUID, $sUNAME, $iTID, $sTNAME,$iEID, $sENAME, $rc); my $sWorkbenchDSN; # Using the project name, retrieve the proper ODBC datasource name + from the INI file. $sWorkbenchDSN = &getIniKeyValue($sProjName, "dsn", $WB_INI_FILENA +ME); $DBUserName = $username; ##Rel 3.3 - PIM 19986 $username = removeSpecialChar($username); if ($username, $password) ## checks for username and password { local ($error); $error = ""; my $db = OpenDatabaseConnection($sWorkbenchDSN); ### Query User ID and Password $sql = qq| SELECT M.MemberID, M.MemberName, M.PrimaryTeamID, T.TeamName, M.PrimaryEventID, E.EventName, M.PrimaryAreaID, A.AreaName, M.ExpDate FROM tblMember M, tblTeamMember TM, tblTeam T, tblEvent E, tblArea A WHERE M.MemberID = TM.MemberID AND M.PrimaryTeamID = T.TeamID AND M.PrimaryEventID = E.EventID AND M.PrimaryAreaID = A.AreaID AND M.Status != 'INACTIVE' AND M.MemberName = '$username' AND M.Password = '$password'; |; my $sth; # Prepare SQL statement unless($sth = $db->prepare($sql)) { $error = 1; $sth->finish; $db->disconnect; &login($path, $error); exit; } # Execute the SQL statement $rc = $sth->execute; # Check to see if username and password are correct if ($rc != -1) { ########################################################## +################## ## level 2 admin ########################################################## +################## ### Query User ID and Password $sql = qq| SELECT M.Status FROM tblMember M WHERE M.MemberName = '$username' AND M.Password = '$password'; |; my @User = &executeSQLStatement($sql); if ($User[0] eq 'ACTIVELEVEL2') { $sessionInfo = "$iUID|ADMIN|0|0|0|0|" . "0|0|$sWorkbenchDSN|$sProjName"; ### If user's password is default (password), force ch +ange if (($password eq 'PASSWORD') || ($password eq 'passwo +rd')) { $sth->finish; $db->disconnect; my $project = $in{'Project'};