Hi I am new to perl and I need your help. I can't figure out how to read cookies. It's probably very simple.
I have existing simple cookie with name User and value Mark.
I have script:
use CGI;
my $query = new CGI;
my $cookie_in = $query->cookie('User');
print "Content-type: text/html\n\n";
print "Value is $cookie_in";
exit;
If I execute script as part of *.shtml page
I will get cookie value as I need. No problem there,
If I run the same script it self it will display blank page. It will not find the cookie. What do I have to do if I want to read cookie "User" in perl script and use value somwhere else in the script.
Why script can not read cookies unless I execute it in shtml file?
I really need help because I am new to cookies and I know just a little bit about perl.
Thank you Charles
I have existing simple cookie with name User and value Mark.
I have script:
Code:
#!/usr/bin/perl use CGI;
my $query = new CGI;
my $cookie_in = $query->cookie('User');
print "Content-type: text/html\n\n";
print "Value is $cookie_in";
exit;
If I execute script as part of *.shtml page
Code:
<!--#exec cgi="/cgi-bin/SSI-LastName.cgi"-->If I run the same script it self it will display blank page. It will not find the cookie. What do I have to do if I want to read cookie "User" in perl script and use value somwhere else in the script.
Why script can not read cookies unless I execute it in shtml file?
I really need help because I am new to cookies and I know just a little bit about perl.
Thank you Charles