01-07-27 05.38, skrev Sam Tregar på sam@tregar.com följande: > That's what tie is for. Your object can store the two tied objects - the > array tie and the hash tie. Then you can dispatch to the appropriate > object when ->[] or ->{} is called. I seee no reason why the following shouldn't work. $foo = bless {},"myclass"; my (%data, @data); tie %data,'myclass',$foo; tie @data,'myclass',$foo; sub TIEARRAY { return $_[1]; } sub TIEHASH { return $_[1]; } Now they are both tied to $foo. On another note, why can't I get to the value I am being tied to from inside TIE*, do I realy need to traverse the stack to find that value? -- ArthurThread Previous | Thread Next