sub STORE { my ($tied_hash, $value, @keys) = @_; my ($x, $y, $z) = @keys; # to stay consistent with above example if( $x == 'foo' ) { ... } ... } sub FETCH { my ($tied_hash, @keys) = @_; my ($x, $y, $z) = @keys; # to stay consistent with above example if( $x == 'foo' ) { ... } ... }