rule palindrome { $foo := (\w+) ::: { fail if $foo ne reverse $foo } } # Note: doesn't match empty string