|
|
| Do you know where your variables are? | |
| PerlMonks |
Re^2: Cookies write to screen, not to cookie fileby TJD (Initiate) |
| on Jul 01, 2004 at 16:53 UTC ( [id://371237]=note: print w/replies, xml ) | Need Help?? |
This is an archived low-energy page for bots and other anonmyous visitors. Please sign up if you are a human and want to interact.
I've tried to use the modules, without success. My own ignorance is undoubtedly responsible. I'm still trying to learn Perl, after several years of writing scripts, and I haven't studied the modules. I tried to limit the amount of information that I included in my original problem declaration because I know that much of it would be superfluous, but here's a little background. The application is a shopping cart system. The main script, named kart.cgi, does contain a content command line. Most of the output takes place in another script, called config.cgi. The latest script is called register.cgi, and contains no print statements. All information is passed to config for output. All of the subroutines for registration are in the register.cgi script, but control remains with kart.cgi. I thought that by using the require command, the content would be negated when the subroutines were accessed, but apparently not. :-) Until the visitor inputs the information that I am trying to output with the cookie, how can I write it to his or her cookie file? Ergo, I need to collect the data before I can write it out. If I was simply creating a visit count, or something like that, I could write the cookie as soon as the kart.cgi is opened. To the best of my knowledge, the \r\n at the end of a print statement is only important as a delimiter when viewing source code. Is there another reason why it should be in the Set-cookie: command line?
In Section
Seekers of Perl Wisdom
|
|
||||||||||||||||||||||||||||||