in reply to hash ref as member of class

Almost there. each %{$self->{HREF}} should do. In general, if you have an expression ($self->{HREF} is an expression) that yields a hashref, putting %{ } around that expression gives you the hash.

Replies are listed 'Best First'.
Re^2: hash ref as member of class
by Fletch (Bishop) on Aug 11, 2009 at 16:52 UTC

    Just as an aside for the OP why your initial try was wrong: your %$self->{HREF} parses as (%{$self})->{'HREF'} because %$self is a complete term to which the -> deref operator is (unsuccessfully) applied. Using the curlies works kind of like specialized parens letting perl know that what you want to dereference is the hashref the expression $self->{HREF} contains.

    The cake is a lie.
    The cake is a lie.
    The cake is a lie.

      thanks that makes sense. I initially tried %($self->{HREF}) w/ parens instead of curly braces. perl is confusing like that - you initalize a hash with parens, access and derefence with curly braces, etc.
        You do not initialize hashes with parens. You can, however, initialize a hash with a list, and if you do a list assignment, you may need parenthesis for parsing precedences. But those parens are there just for precedence - they carry no syntactical meaning. Had the assignment operator been a postfix one, the parenthesis wouldn't be there.
Re^2: hash ref as member of class
by bob_dobalina (Sexton) on Aug 11, 2009 at 20:15 UTC
    gracias! that did it