in reply to Hashes and Cookies (or more to the point, strings)
my $cookie = 'name1,value1,name2,value2'; my %hash = split(',', $cookie);
Or you can use string eval on your quoted string (but why?):
my $cookie = '("Name1","Value1","Name2","Value2")'; my %hash = eval $cookie;
update: But don't do that. As crazyinsomniac points out, it's not a really good idea to eval cookie contents...
|
|---|