bkiahg has asked for the wisdom of the Perl Monks concerning the following question:
The problem is that $array = 'HTML::Element=HASH(0x1a031f4)' a scalar reference. And when I split it its still a scalar reference.while(my ($key, $value) = each(%{$tree})) { if (ref($value) eq 'ARRAY') { foreach my $array (@{$value}) { my @split = split(/\=/, $array); if (ref($split[1]) eq 'HASH') { print "hello"; while(my ($key, $value) = each(%{$split[1]})) { print "$key = $value<br>\n"; } } } } }
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re: Trouble Traversing Hash and Array References
by ccn (Vicar) on Aug 23, 2004 at 14:58 UTC | |
by bkiahg (Pilgrim) on Aug 23, 2004 at 15:04 UTC | |
|
Re: Trouble Traversing Hash and Array References
by eric256 (Parson) on Aug 23, 2004 at 14:52 UTC |