http://qs321.pair.com?node_id=382573


in reply to Finding longest palindrome from a string

A very humble attempt:
sub tune { my $l = ""; map {$l=$_ if ($_ eq reverse $_)&&(length $l<length $_)} split /\s ++/, $_[0]; return $l; }

--
tune