sub tune { my $l = ""; map {$l=$_ if ($_ eq reverse $_)&&(length $l<length $_)} split /\s ++/, $_[0]; return $l; } [download]
-- tune
In reply to Re: Finding longest palindrome from a string by tune in thread Finding longest palindrome from a string by BUU