That said, religion is based on the idea of worshiping a core idea, that shouldn't be contested, while science is based on the idea of contesting your core ideas, and never accepting pure belief. They are similar on the way that opposite things always have some similarity.
(Anyway, "the scientific method is perfect" is a very bad misquote of the OP. Believing your method is perfect is anti-scientific, you should be always on the hunt for a better method.)