A generalization of Zubov's method to perturbed systems