oh I got it to work for the most part, there seemed to be alot of little things I was misses took some trial and error but I got it heres the code just incase someone might need it.
use CGI; use CGI::Session; use strict; my $q = new CGI; print $q->header( "text/html" ); #--------------------------------------# #------------- Variables --------------# #--------------------------------------# my %valueHash; my %newHash; GrabParams(); my $session; my $SID; #--------------------------------------# #---- New/Open Session Condition ------# #--------------------------------------# if ($valueHash{"sessPass"} == 1) { $session = new CGI::Session(undef, undef, {Directory=>'tmp/ses +sions'}) or die CGI::Session->errstr; #--> creates a CGI::Session Obj +ect for use $SID = $session->id; }else{ $session = new CGI::Session(undef, $valueHash{"session"}, {Dir +ectory=>'tmp/sessions'}) or die CGI::Session->errstr; #--> Open sessi +on my %newHash = %{$session->param('valueHash')}; #--> load sessi +on hash and save it into a new hash (had to derefference it first wit +h %{}) #--> Loop through the load hash and push the values into value +Hash #--> so the new and old parameters are in one hash #------------------------------------------------------------- +------> while (my($k, $v) = each(%newHash)) { $valueHash{$k} = $v; printf("<br>key: %s value: %s", $k, $v); } #--> After loading session variables and setting them to the n +ew variables in valueHash #--> we need to clear the session hash values so we can rewrit +e the new values #------------------------------------------------------------- +--------------------------> $session->clear(); } $session->param('valueHash', \%valueHash); $session->flush(); #--------------------------------------# #------------ Functions ---------------# #--------------------------------------# sub GrabParams{ my ( $paramName, $paramValue); foreach $paramName ($q->param) { foreach $paramValue ($q->param( $paramName )) { $valueHash{ $paramName } = pack 'U0A*', $paramValue; } } }
thanks for everyones help for pointing me in the right direction.

In reply to Re: Using Sessions to save Parameters by ikkon
in thread Using Sessions to save Parameters by ikkon

Title:
Use:  <p> text here (a paragraph) </p>
and:  <code> code here </code>
to format your post, it's "PerlMonks-approved HTML":



  • Posts are HTML formatted. Put <p> </p> tags around your paragraphs. Put <code> </code> tags around your code and data!
  • Titles consisting of a single word are discouraged, and in most cases are disallowed outright.
  • Read Where should I post X? if you're not absolutely sure you're posting in the right place.
  • Please read these before you post! —
  • Posts may use any of the Perl Monks Approved HTML tags:
    a, abbr, b, big, blockquote, br, caption, center, col, colgroup, dd, del, details, div, dl, dt, em, font, h1, h2, h3, h4, h5, h6, hr, i, ins, li, ol, p, pre, readmore, small, span, spoiler, strike, strong, sub, summary, sup, table, tbody, td, tfoot, th, thead, tr, tt, u, ul, wbr
  • You may need to use entities for some characters, as follows. (Exception: Within code tags, you can put the characters literally.)
            For:     Use:
    & &amp;
    < &lt;
    > &gt;
    [ &#91;
    ] &#93;
  • Link using PerlMonks shortcuts! What shortcuts can I use for linking?
  • See Writeup Formatting Tips and other pages linked from there for more info.