There are 2 things to be aware of when using print $q->redirect(-uri=>"home.pl", -cookie=>$cookie); as pointed out in the CGI documentation under Generating_a_redirection_header.
1) You should always use full URLs (including the http: or ftp: part) in redirection requests. Relative URLs will not work correctly.
2) All names arguments recognized by header() are also recognized by redirect(). However, most HTTP headers, including those generated by -cookie and -target, are ignored by the browser.
I take from those 2 comments that the results could be unpredictable.
In reply to Re^4: cookie problem
by fishmonger
in thread cookie problem
by bigup401
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |