Exactly.
The user agent (web browser) makes a request of the server. It has no cookie. It then waits for a response.
The web server receives the request and fills in all of the environmental variables. Since the user agent had no cookie when it made the request, $ENV{COOKIE} is not set. By the time your program gets control, CGI.pm attempts to pull a cookie out of $ENV{COOKIE}. The user agent still has no cookie. CGI.pm finds no cookie. Your program gets no cookie.
Your program then creates a cookie and sends information to the user agent.
The user agent will only send the cookie at its next request. You don't get an instantaneous reaction with this sort of programming. The client sends a chunk, then the server sends a chunk.
Make sense?
In reply to Re: The Cookie Monster Returns......$ENV on tripod???????
by chromatic
in thread The Cookie Monster Returns......$ENV on tripod???????
by Baz
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |