in reply to Re^2: cgi::session issue with session data retrival
in thread cgi::session issue with session data retrival

Looking through the documentation for CGI::Session, I see that there are a number of formats for new(); none of which equate to what you have in session2.pl:

my $session = new CGI::Session(undef, $sid, {Directory=>'d:/TBD'});

Compare that with the equivalent line in session1.pl.

Also, I'd recommend using the Class->new form instead of the new Class form. Take a look at Indirect Object Syntax in perlobj for a discussion of this. It's a good habit to get into and may save you some grief down the track.

-- Ken

Replies are listed 'Best First'.
Re^4: cgi::session issue with session data retrival
by saifuddin786 (Initiate) on Oct 27, 2010 at 08:31 UTC
    it worked after i used CGI::Session->load($sid). Thanks a lot. It worked for a string, now i need to stored a object :). lets see how it works.