We solve a class of weighted isoperimetric problems of the form $$ \min\left\{\int\_{\partial E}w e^V\,dx:\int\_E e^V\,dx={\rm constant}\right\} $$ where $w$ and $V$ are suitable functions on $\R^d$. As a consequence, we prove a comparison result for the solutions of degenerate elliptic equations.