my $back = reverse $forw; if ($back eq $forw) { # it is a palindrome