Role of the Dzyaloshinskii-Moriya interaction in multiferroic perovskites