in reply to arithmetic in a regex ?

Searching for a number, followed by a char, followed by the same number is easy:

m/(\d).\1/

That also matches 111:

$ perl -E 'say "match" if "111"=~/(\d).\1/' match $

Alexander

--
Today I will gladly share my knowledge and experience, for there are no sweeter words than "I told you so". ;-)