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


in reply to Re: Block Search
in thread Block Search

If you just want to find the longest sequence, a few tweaks will bring it down to.... 47 chars
# 1 2 3 4 #2345678901234567890123456789012345678901234567 print+(sort{$b=~y///c-$a=~y///c}/((.)\2*)/g)[0]

-Blake