perl -e 'do{length>length$@&&($@=$_)}for<>;print$@' file