http://www.perlmonks.org?node_id=1084790


in reply to Check if a variable contains only one letter?

Use anchors: /^X+$/