in reply to traversing through a (complex for me) data structure
for my $acct_id (keys %customers) { print "Account: $acct_id\n"; for my $ip (keys %{$customers{$acct_id}}) { # Do stuff here with IP print "IP: $ip\n"; for my $id (keys %{$customers{$acct_id}{$ip}}) { print "ID: $id\n"; } } }
As I frequently seem to be specifying, I like to visualize my data structure and how it's layed out. Just to ensure you are properly visualing your data structure, you may want to take a look at Re: How can I visualize my complex data structure?. Then take advantage of Data::Dumper to ensure that you are traversing your data structures in the proper manner.
Eric
|
|---|