Let

bed binary linear

code defined by a check matrix

and let

be the characteristic function for the set of columns of

. Connections between the Walsh transform of

and the weight distributions of all translates of the code are obtained. Explicit formulas for the weight distributions of translates are given for small weights

. The computation of the weight distribution of all translates (including the code itself) for

requires at most

additions and subtractions,

multiplications and

memory cells. This method may be very effective if there is an analytic expression for

. A simple method for computing the covering radius of the code by the Walsh transform of

is described. The implementation of this method requires for large

at most

arithmetical operations and

memory cells. We define the concept

-perfect for codes, where

is a set of weights. After describing several linear and nonlinear

-perfect codes, necessary and sufficient conditions for a code to be

-perfect in terms of the Walsh transform of

are established. An analog of the Lloyd theorem for such codes is proved.