You question is not worded very clearly. So I am going to assume that from this statement, '
I can fecth the value from a cookie which has only one value, but I am now using a cookie which has two values' that you are asking how to retrieve multi-valued cookies.
Straight from the
CGI::Cookie docs:
value()
Get or set the cookie's value. Example:
$value = $c->value;
@new_value = $c->value(['a','b','c','d']);
value() is context sensitive. In a list context it will return the
+ current value of the cookie as an array. In a scalar context it will
+ return the first value of a multivalued cookie.
So you'll need retrieve the data as a
hash (array) - the same way you put it in.
UNTESTED
my %cookie_value = $cookies{'LSRfm'.$type}->value;
grep
|
Mynd you, mønk bites Kan be pretti nasti... |
Posts are HTML formatted. Put <p> </p> tags around your paragraphs. Put <code> </code> tags around your code and data!
Titles consisting of a single word are discouraged, and in most cases are disallowed outright.
Read Where should I post X? if you're not absolutely sure you're posting in the right place.
Please read these before you post! —
Posts may use any of the Perl Monks Approved HTML tags:
- a, abbr, b, big, blockquote, br, caption, center, col, colgroup, dd, del, details, div, dl, dt, em, font, h1, h2, h3, h4, h5, h6, hr, i, ins, li, ol, p, pre, readmore, small, span, spoiler, strike, strong, sub, summary, sup, table, tbody, td, tfoot, th, thead, tr, tt, u, ul, wbr
You may need to use entities for some characters, as follows. (Exception: Within code tags, you can put the characters literally.)
| |
For: |
|
Use: |
| & | | & |
| < | | < |
| > | | > |
| [ | | [ |
| ] | | ] |
Link using PerlMonks shortcuts! What shortcuts can I use for linking?
See Writeup Formatting Tips and other pages linked from there for more info.