Direct perturbation theory (DPT) is applied to compute relativistic corrections to electrical properties such as dipole moment, quadrupole moment, and electric-field gradient. The corrections are obtained as second derivatives of the energy and are given via method-independent expressions that involve the first derivative of the density matrix with respect to the relativistic perturbation as well as property integrals with additional momentum operators. Computational results obtained using Hartree-Fock (HF), second-order Moller-Plesset (MP2) perturbation theory, and the coupled-cluster singles and doubles approach augmented by a perturbative treatment of triple excitations are presented for the hydrogen halides HX with X=F, Cl, Br, (I, At) and the magnitude of relativistic effects, their basis-set dependence, and the limitations of DPT are discussed. We compare our results to those obtained using the second-order Douglas-Kroll method and benchmark them using four-component HF (Dirac-HF) and MP2 calculations. Relativistic effects are shown to be already important for elements of the third row (Na-Ar) when aiming at a high-accuracy quantum-chemical treatment. DPT provides reliable results for compounds containing elements up to the fourth period (K-Kr) and only breaks down when applied in lowest order to heavier elements. As a first application of the present DPT treatment for electrical properties, we report calculations for bromofluoromethane (CH(2)FBr) which was investigated using rotational spectroscopy by Cazzoli et al. [Mol. Phys. 106, 1181 (2008)] and for which consideration of relativistic effects turns out to be essential for good agreement between theory and experiment in the case of the bromine quadrupole-coupling constant.