Home: Perl Programming Help: Beginner:
Can't read a cookie


May 24, 2000, 3:13 PM

Views: 1477
Can't read a cookie

I'm using the following code to read a cookie and redirect based on if it exists or not.

use CGI;

$co = new CGI;

%greetings = $co->cookie('greetings');

if ($co->param('name')) {
$greetings{'name'} = $co->param('name')

if ($co->param('birthday')) {
$greetings{'birthday'} = $co->param('birthday')

if(exists($greetings{'name'})) {

$url = 'http://fixed40/test/macomprod.html';
print "Location: $url\n\n";

} else {

$url = 'http://fixed40/test/magetinfo.html';
print "Location: $url\n\n";


It works on my personal web server but when I try it on the NT IIS server it's a no go. Anybody have any ideas? Thanks in advance.