Snuggle has asked for the wisdom of the Perl Monks concerning the following question:
this looks like a hash to me so I attempted to copy the cookie string to a variable like so:name1,value1,name2,value2....etc.
so now $cookie has one long string with all the data separated by commas. Now, I append ()'s and quotes in all the right places, and I have a string that says something like this:my $rep= new CGI; my $cookie = $rep->cookie("cookiename");
Setting my hash equal to this never worked right, I suspect that it has something to with the fact that the equal operator does not take the string as a literal and instead put the whole string in the first key. Is there any way to have a hash look at a string in the literal sense, or do I have to split the string into an array and hash it from there? Thanks("Name1","Value1","Name2","Value2")
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re: Hashes and Cookies (or more to the point, strings)
by bikeNomad (Priest) on Jul 19, 2001 at 19:23 UTC | |
|
Re: Hashes and Cookies (or more to the point, strings)
by lhoward (Vicar) on Jul 19, 2001 at 19:23 UTC | |
|
Re: Hashes and Cookies (or more to the point, strings)
by mikeB (Friar) on Jul 19, 2001 at 19:32 UTC |