Hai all,
I use the strict paragma and and declared variable as correctly. After compilation there is no error and this time i cant read the cookie from the second window (pop up window generated by javascript). I request you to please point out the error if any one faced this problem. i send thecode that i corrected as follows. Thanks in Advance... Regards Manoj ****************************************************************************************************** #!/usr/bin/perl use strict; use CGI; our $output = new CGI(""); our $input = new CGI; our $cookie; print "Content-type: text/html\r\n\r\n"; if ($input->param('cmd') eq 'test2') {&test2;} else { &test; } sub test { $cookie = $output->cookie(-name => 'uid', -value => u100', -expires => '+1d'); $output->header(-expires => '-1d',-cookie =>$cookie); print "<html>\n"; print "<head>\n"; print $cookie." ssssssssssssssssssssssf \n"; print "<script language=\"Javascript\">\n"; print "function spawn(page) {"; print "window.open(page,\"\",\"left=5,top=5,height=480,width=600,status=yes,toolbar=no,menubar=no,scrollbars=yes\");} </script>\n"; print "</head>\n"; print "<body lang=en-US style=\"background-color: rgb(153,204, 255);\"\n"; print " <h3>MENU</h3>\n"; print "<p><a href=\"#\" Onclick='spawn(\"/testcookie.pl?cmd=test2\")\'>OnlineTest </a></p>"; print "</body></html>\n"; } sub test2 { print "<html>\n"; print "<head>\n"; print "</head>\n"; print "<body lang=en-US style=\"background-color: rgb(153, 204, 255);\">\n"; print $cookie." dffffffffffffffffffffff \n"; print " <h3>MENU</h3>\n"; print "<p><a href=\"#\" Online Test </a></p>"; print "</body></html>\n"; } ***************************************************************************************************** -- ______________________________________________ Check out the latest SMS services @ http://www.linuxmail.org This allows you to send and receive SMS through your mailbox. Powered by Outblaze -- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] <http://learn.perl.org/> <http://learn.perl.org/first-response>