I'm using this script to put up a cookie in my browser so that when a user logs in, it remembers the loginname of the person. I tested out this cookie script code
#!/usr/bin/perl
use CGI qw/:standard/;
# Create a CGI object.
my $IN = new CGI; # Define the cookie.
my $cookie = $IN->cookie( -name => 'ID', -value => 123456, -expires => '+1h', -domain => '' );
# Create the cookie.
print $IN->header( -cookie => $cookie );
# Fetch cookie.
my $id = $IN->cookie('ID');
print "Test: $id";
but my id always comes out with the value w, what is wrong?
wired
#!/usr/bin/perl
use CGI qw/:standard/;
# Create a CGI object.
my $IN = new CGI; # Define the cookie.
my $cookie = $IN->cookie( -name => 'ID', -value => 123456, -expires => '+1h', -domain => '' );
# Create the cookie.
print $IN->header( -cookie => $cookie );
# Fetch cookie.
my $id = $IN->cookie('ID');
print "Test: $id";
but my id always comes out with the value w, what is wrong?
wired