perl -e 'print+(sort{$b<=>$a}map{length}<>)[0]'  file