use utf8; utf8::decode($_=join'',<>); for$d(reverse 0..100){ exit!print$d if $_=~/…{$d}/ # exit!print$d if index($_,'…'x$d)>=0; }