#!C:\perl\bin\perl.exe use CGI; my $cgi = CGI->new; my @cookieOut; push @cookieOut, ($cgi->cookie( -name => 'id', -value => "something", -expires => '+7d', -path => '/')); print $cgi->redirect( -cookie => \@cookieOut, -location => 'productCategory.cgi' );