in reply to Listing Keys in a specific element(s) in an array of hashs
I guess you want to traverse the array, and then traverse each hash elements. One solution could be:
for my $hash (@data) { for (keys %$hash) { ... }
If you simply want to list the keys of a hash, you can do:
my @keys = keys %{$data[0]}; # or [1], or [2], ...
Hope this helps.
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re^2: Listing Keys in a specific element(s) in an array of hashs
by Smylers (Pilgrim) on Jun 20, 2005 at 14:19 UTC |