in reply to Re: Palindrome Program without Reverse function
in thread Palindrome Program without Reverse function

You replied to a 4 years old thread. Moreover, you check half the pairs pointlessly - there's no need to check $arr[$#arr] versus $arr[0], when you've already checked $arr[0] versus $arr[$#arr]. Here's how I'd code your idea:
#!/usr/bin/perl use strict; use warnings; chomp(my $name = <>); my @arr = split //, $name; my $is_palindrome = 1; for my $i (0 .. $#arr / 2) { # warn "$arr[$i] eq $arr[ -$i - 1 ]"; if ($arr[$i] ne $arr[ -$i - 1 ]) { undef $is_palindrome; last } } print 'Word is', $is_palindrome ? q() : ' not', " a palindrome!!!\n";
لսႽ† ᥲᥒ⚪⟊Ⴙᘓᖇ Ꮅᘓᖇ⎱ Ⴙᥲ𝇋ƙᘓᖇ