http://qs321.pair.com?node_id=519972


in reply to Re: Using regex to match double letters, and only double letters
in thread Using regex to match double letters, and only double letters

Lots of things you can do with backreferences. Even check for primes:
perl -wle 'print "Prime" if (1 x shift) !~ /^1?$|^(11+?)\1+$/'
(by Abigail)