Perturbation of a nonautonomous problem in $\mathbb{R}^n$