Source of quote "to a man with a hammer, everything looks like a nail"

I keep seeing this quote or something like it attributed to Mark Twain, but I have not been able to find this in any verified source. Can anyone help with attribution, and also with getting the exact quote?

Without trying to search exhaustively, it first appears by Abraham Maslow, The Psychology of Science (1966).

Commonly known as “Maslow’s Hammer”, apparently.

I propose Really All That Bright’s Law: Anything clever anyone has ever said will eventually be attributed to Mark Twain.

Is that the exact quote? I always heard 'If all you have is a hammer, every problem looks like a nail".

Bob

It’s been recast several times. Here’s the original quote:

Y’know, I think you stole that idea from Mark Twain.

Which is ironic, because it’s also tempting, if the only tool you have is a hierarchy, to treat everything as if it were a need.

Oh self transcendent snap!

I’d be all ready to back you up on this, but I’m kinda sleepy, so I’m gonna go take a nap.

I asked this same question here a few years back (I have the quote up in my workspace). I got the same answers - no one knows for sure, but Maslow seems like the best bet.

My SDMB search powers are weak - anyone else want to see if they can find it.

If I had a hammer

I’d hammer in the morning*

*all together now!

“I never said most of the things I said.” -Yogi Berra

I wonder if I should include Jefferson somehow.

Bang, bang, Maslow’s silver hammer
came down upon the thread.

RR

Or Oscar Wilde:

Actually Bill Gates said that in a college graduation keynote speech. He got it from George Carlin who lifted it from a Ted Nugent article.

Glad to help

I once edited a book of quotations. Nailing down the actual origin of most quotes is a million times more difficult than you might imagine. Even when the quotes appear in print, it’s usually pretty tough to identify the original source. And what’s worse, subsequent mis-attributions muddy the water.

thanks guys!

Nugent, though, was quoting Andy Rooney.

very very witty.