in reply to looping in a hashtable
I think the structure you are seeking is a HASH-OF-ARRAYS. Something like this:
If this is confusing, please study REFERENCES in perl. (perldoc perlref from a command line).my %Accountinfo; $Accountinfo{E200} = [200, 300, 400]; $Accountinfo{E400} = ["EFG"]; #Now , you can iterate through all stores for all accounts: for my $acct (sort keys %Accountinfo){ for my $store (@{ $Accountinfo{$acct} } ){ print "Account $acct has store $store\n"; } }
I hope life isn't a big joke, because I don't get it.
-SNL
|
|---|