in reply to SOAP::Lite and hash of hashes
In the foreach you are converting the hash into an array and loop through all the keys and values. So $r is a key in the first iteration, then a value, then a key. $r->result makes no sense either, since 'result' is the name of the hash and should be before the key
foreach my $r (keys %$result){ print $result->{$r}->{Person}->{commonname}; }
$result is a pointer to a hash and $r is now a key of it (note the keys function)
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re^2: SOAP::Lite and hash of hashes
by joec_ (Scribe) on Feb 12, 2009 at 14:45 UTC | |
by jethro (Monsignor) on Feb 12, 2009 at 15:16 UTC | |
by joec_ (Scribe) on Feb 12, 2009 at 15:55 UTC | |
by jethro (Monsignor) on Feb 12, 2009 at 16:09 UTC | |
by joec_ (Scribe) on Feb 12, 2009 at 16:16 UTC |