Classic. I've heard it a lot (in multiple variations), but never with an attribution. Its Wikipedia article even has a citation! -- which shows the original (not particularly epigrammatic) wording as:
I suppose it is tempting, if the only tool you have is a hammer, to treat everything as if it were a nail.
(Last month's started a little late, I thought I'd bring it back to its original schedule.)
A monthly thread for posting any interesting rationality-related quotes you've seen recently on the Internet, or had stored in your quotesfile for ages.