in reply to Need Help on CGI::Cookie

Reading through CGI::Cookie suggests that you have to use

$user = $cookies{'USER'}->value;

What exactly does I could not able to get the cookie value. mean? Is it always undef?

Do you use strict and warnings?

Did you confirm that the cookie was set indeed? (most browsers let you view all cookies)

Replies are listed 'Best First'.
Re^2: Need Help on CGI::Cookie
by Anonymous Monk on Sep 07, 2007 at 14:58 UTC
    Thanks for your time, moritz. I tried using, $user = $cookies{'USER'}->value; but it does not work either. I use strict and warnings. And your correct, it always print undef. when I print the environmental variables, I found that cookie is not set. Please let me know what else I need to check? Thanks again.
      If the cookie is not set, you have to debug the part where the cookie should be set.

      Try to query that CGI page with wget --server-response $url and paste the headers here.