I'm not sure what you're saying.  Since this is an anonymous hash assignment,
how do I pull out the $listkey?  Do I need to pre-assign it?  For example,
I tried this, added to the previous program,

foreach $listname (sort keys %Lists) {
    print "$listname:\n";
    foreach $key (sort keys %Lists) {
        print "\t$Lists{$key}\n";
    }
}

And the out put is,

list-1:
        HASH(0x55750)
        HASH(0x55750)
        HASH(0x55750)
        HASH(0x55750)
list-2:
        HASH(0x55750)
        HASH(0x55750)
        HASH(0x55750)
        HASH(0x55750)
list-3:
        HASH(0x55750)
        HASH(0x55750)
        HASH(0x55750)
        HASH(0x55750)
list-4:
        HASH(0x55750)
        HASH(0x55750)
        HASH(0x55750)
        HASH(0x55750)

So, Iguess I just pulled out the reference to the location?  

My initial request remains, 

: But, I don't quite get how to get to the key values below that.  I know I'm so
: close, but just not quite there...
:
: Could some kind soul give me a blow by blow "what's happening here" going from

    $Lists{$listname} = \%hrLists;

: to printing out the key, values by $listname?



Timothy Johnson <[EMAIL PROTECTED]> had this to say,
> 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]

Reply via email to