Magnetic properties of arrays of nanowires produced inside the pores of anodic alumina membranes have been studied by means of vibrating sample magnetometer techniques. In these systems the length of the wires strongly influences the coercivity of the array. A simple model for the coercivity as a function of the geometry is presented which exhibits good agreement with experimental results. Magnetostatic interactions between the wires are responsible for a decrease of the coercive field.