in reply to Re: Understanding the Use of Session Variables
in thread Understanding the Use of Session Variables

Thanks for the reply. I am already using CGI (from my code above I didn't show you that $q-> new CGI();) and I am looking to use CGI::Session b/c I agree that splitting the QUERY_STRING is not the best method. But then again, we all crawled before we ran, right? I'm not a programmer by any means. It is simply by the virtue of the helpful folks here at PerlMonks and countless hours of reading/writing/testing that I am able to perform the minimal Perl/CGI writing that I do. Once I set a cookie, how to I access it from the second page? I'm assuming that if I use the default method for generating a cookie that it's name will be the session ID. So I still have to know what that is to reference the cookie from page two, right?

my $session = new CGI::Session(); print $session->header();

Replies are listed 'Best First'.
Re^3: Understanding the Use of Session Variables
by moritz (Cardinal) on Mar 05, 2009 at 16:28 UTC
    Did you even read the tutorial I linked to? In the end you have to understand what you're doing, and the best way is to read introduction level tutorial like the one I gave you, and then start experimenting.
    Once I set a cookie, how to I access it from the second page?

    By using CGI:Session. It looks in the header, finds the session ID in the cookie, and then loads the session object from local storage.

    A reply falls below the community's threshold of quality. You may see it by logging in.