tied hash



I have a tied hash, say %a. On a tied 'STORE' I want to get the return values of the STORE function. is that possible? a naive aproach would be
@a = ($a{'key'} = 'value'); however this returns still the tied FETCH
of $a{'key'}. How do i have to reorder the expression??


-- Konrad




%a = (); tie %a,'Ta'; @a = ($a{'key'} = 'value');


package Ta; use Tie::Hash; @ISA = qw(Tie::StdHash);

sub STORE {
	return [1,2,3];
}




I'd like to get @a == [1,2,3] .



Relevant Pages

  • Re: tied hash
    ... Konrad Eisele wrote: ... > I have a tied hash, ... On a tied 'STORE' I want to get the return ... > values of the STORE function. ...
    (comp.lang.perl.misc)
  • Re: tied hash
    ... Konrad Eisele wrote: ... > I have a tied hash, ... On a tied 'STORE' I want to get the return ... assignment returning the assigned value is implemented with FETCH ...
    (comp.lang.perl.misc)
  • Re: tied hash
    ... > values of the STORE function. ... How do i have to reorder the expression?? ... in a tied hash, ... "Reply" at the bottom of the article headers. ...
    (comp.lang.perl.misc)