James Taylor wrote: > > How do you get a list of all keys in a hash of arrays? I'll have a hash > where the data would look something > like: > > %myhash = ('client19' => [ 'client2', 'client5', 'client7' ], > 'client20' => [ 'client3', 'client4', 'client8' ]); > > I need to basically get a list of the hash values and display the array > values for each one.
for my $key ( keys %myhash ) { print "1) @{$myhash{$key}}\n"; print "2) $myhash{$key}[0]\t$myhash{$key}[1]\t$myhash{$key}[2]\n"; } Read the Data Structure Cookbook and the List of List document. perldoc perldsc perldoc perllol John -- use Perl; program fulfillment -- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]