$my_ordered_hash{$old_key} = $newvalue; #### sub STORE { my( $this, $key, $val ) = @_; if ( exists( $this->{hash}->{$key} ) ) { $this->{hash}->{$key} = $val; } else { $this->{hash}->{$key} = $val; push @{$this->{order}}, $key; } }