Following is the piece of code i have tried to write please let me know you comments. also i am not getting any display for the same where am i making an error
nor any logs are getting generated for me

#!c:\Perl\bin\perl.exe #PLEASE ENTER THE PATH WHERE YOUR CGI PROGRAM WILL BE STORED -wT use strict; use CGI; use CGI::Cookie; use Data::Dumper; #use CGI::Session::File; my $cgi = new CGI; print $cgi->header; print $cgi->start_html; #print <<HERE; #<b>jkasgdf</b> use constant SESSION_COOKIE => "MY_SITE_SIDE"; my $sid = $cgi->param("sid") || undef; #creating a new session my $session = new CGI::Session::File(undef, {LockDirectory =>"/Amexpmo/login/a +mex/sessionlogs", Directory =>"/Amexpmo/login/amex/ +sessionlogs"}) or die $CGI::Session::errstr; print "Your session id is ", $session->id(); # A cookie is being created which is then being send to the user brows +er my $cookie = $cgi->cookie(CGISESSID => $session->id ); print $cgi->header(-cookie=>$cookie); # $session->save_param($cgi, ["login_name", "password"]); # this line saves all the available/accessible CGI params $session->save_param($cgi); print Dumper(\$session); $session->expire('+3h'); print Dumper; #HERE #print $cgi->end_html;

In reply to session handling with cgi by rjsaulakh

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.