in reply to lvalue trickery
You haven't stored anything in the hash yet, so $_[0]->{val}->{one} returns undef, which isn't an lvalue.sub FETCH { my($s, $k) = (shift, shift); return exists( $s->[0]{$k} ) ? $s->[2][ $s->[0]{$k} ] : undef; }
Suggested and untested solution: $h {one} = undef after the tie.
Abigail
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re: Re: lvalue trickery
by broquaint (Abbot) on Jul 26, 2002 at 14:46 UTC |