#!/usr/bin/perl use Encode; use utf8; use List::Util qw/max min/; $count = 0; $tmpcount = 0; $temp =0; $i = 1; binmode STDIN, ':encoding(utf8)'; #binmode STDOUT, ':encoding(cp932)'; #binmode STDERR, ':encoding(CP932)'; while () { my $text = $_; my @te = split(//, $text); foreach my $tepart(@te) { if ($tepart eq "…") { if (($tmpcount+1) eq $temp) { $count++; } else { if ($count > 0) { $ans[$i] = $count; $i++; } $count = 1; } $tmpcount = $temp; } $temp++; } $ans[$i] = $count; if ($i == 1) { print "$ans[1]\n"; } else { print max(@ans); } }