Anonymous Monk has asked for the wisdom of the Perl Monks concerning the following question:
What I'm trying to do is iterate through all the values of the cookies hash and do something with them. The last think I tried (out of about 100 other ways) is:$VAR1 = bless( { 'data_loaded' => 1, 'params' => {}, 'cookies' => { 'Community_Sesssion' => [ '68ce4195515 +b8040f9174503dacfe200' ], 'PHPSESSID' => [ 'e09347f6ca73f155b1fd +6500e92302b8' ], '__utmb' => [ '248415237' ], '__utmc' => [ '248415237' ], '__qcb' => [ '608960055' ], '__qca' => [ '1234223794-30138386-6175 +0767' ] }, 'p' => '', 'nph' => 0, '_debug' => 0 }, 'GT::CGI' );
This outputs:my %cookie_hash = $IN->{cookies}; foreach my $group (keys %cookie_hash) { print "The members of $group are\n"; foreach (@{$cookie_hash{$group}}) { print "\t$_\n"; } }
Honestly, I'm stumped... Any help would be greatly appreciated.. MikeThe members of HASH(0x828b958) are
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re: Dereferencing my hash?
by Fletch (Bishop) on Feb 10, 2009 at 20:03 UTC | |
|
Re: Dereferencing my hash?
by Bloodnok (Vicar) on Feb 10, 2009 at 20:04 UTC | |
|
Re: Dereferencing my hash?
by jethro (Monsignor) on Feb 10, 2009 at 20:07 UTC | |
by Anonymous Monk on Feb 11, 2009 at 01:46 UTC | |
|
Re: Dereferencing my hash?
by AnomalousMonk (Archbishop) on Feb 11, 2009 at 01:37 UTC |