Jan 29, 2001, 11:41 PM
Post #1 of 2
Perl & CGI cookies -
I'm using Perl & CGI to set some cookies (print header(-cookie => $cookie);). After I set the cookies I want to do a print "Location: ...etc", but instead of actually going to the URL it prints the URL in the Browser..
Do i need to change the header type ???
I've attached a sample script..
use CGI qw(:all);
use CGI::Carp qw(fatalsToBrowser);
my $cookie=cookie(-name =>'Sample', -value => 'This cookie contains no message', -expires => '+8d');
print header(-cookie => $cookie);
print "Location: http://www.bbc.co.uk\n\n";