------>8----------------------------- "I understand this: foreach $listname (sort keys %Lists) { print "$listname\n"; } ------>8-----------------------------
To get the values instead of the keys, you will have to do something like this: foreach $listkey (sort keys %Lists){ print "$List{$listkey}\n"; } Or, if you want the values sorted, you want something more like this: foreach $listkey (sort {$Lists{$a} cmp $Lists{$b}} keys %Lists){ print "$List{$listkey}\n"; } This part might look a little confusing at first: sort { $Lists{$a} cmp $Lists{$b} } keys %Lists but it's a useful trick, especially when your "key" is a reference or other "unreadable" variable. -- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]