I once saw a cashier compare the signature on the back of the card (There is a little field for "signature" on the back of credit cards) - to the one I signed. When I noticed I hadn't signed my card he said he couldn't accept my purchase, so I had to sign the card first, then he could compare the signature...
In the UK cards still have a signature strip on the back and if a merchant notices you haven't signed your card they legally have to refuse to accept it. I rarely remember to sign my cards and this tripped me up one time last year when trying to return something to a store which I'd bought online with my credit card. I had to leave the store, buy a pen, sign the card and re-enter the store.
That's exactly what I did too. And yes, this was when visiting the UK. I had no idea the strip on the back of the card was for comparison, never seen it used elsewhere. Would be interesting to hear the person who thought that the signature-comparison thing was a good idea explain how they were thinking.