  A weighted Hamming metric is introduced in [4] and it showed that the binary
generalized Goppa code is a perfect code in some weighted Hamming metric. In
this paper, we study the weight structures which admit the binary Hamming code
and the extended binary Hamming code to be perfect codes in the weighted
Hamming metric. And, we also give some structures of a 2-perfect code and how
to construct a 2-perfect code in some weighted Hamming metric.
