xSirPotsAlotx
New member
I need to write a palindrome program without using the reverse string command, and I am little confused on how to go about and doing it. Does anyone have any ideas?
this is what I have so far:
#!/usr/bin/perl -w
use strict;
use warnings;
my ($a, $b, $result);
print "Enter a item that is 7 characters\n";
($a = <>);
chomp ($b = <>);
if ($a eq $b && $b eq $a)
{
print "THIS IS A PALINDROME!!! \n";
}
else
{
print "THIS IS NOT A PALINDROME \n";
}
I am just stumped as to what to do
this is what I have so far:
#!/usr/bin/perl -w
use strict;
use warnings;
my ($a, $b, $result);
print "Enter a item that is 7 characters\n";
($a = <>);
chomp ($b = <>);
if ($a eq $b && $b eq $a)
{
print "THIS IS A PALINDROME!!! \n";
}
else
{
print "THIS IS NOT A PALINDROME \n";
}
I am just stumped as to what to do