use utf8; utf8::decode($_=<>); for$d(reverse 1..100){ exit!print$d if $_=~('…'x$d) }