My first (well second, but that one doesn’t count) Perl program! Of course, I can paste the source code now… hopefully eventually it’ll be so long I will have to tell you about it.
# To test for a palindrome 2005 02 28
my $word1 = $ARGV;
if (! $word1)
print “Palindrome 2005\n”;
print “Please enter a word to check: “;
print “Processing on $word1\n”;
my @array_word1 = split (//, $word1);
my $array_word1_length = scalar @array_word1;
my $palindrome = 1;
my $x = $array_word1_length – 1;
for($i = 0; $i <= ($x – $i); $i++)
if ($array_word1[$i] ne $array_word1[($x - $i)])
$palindrome = 0;
if ($palindrome == 1)
$not = “”;
$not = ” not”;
print “The word $word1 is$not a palindrome!\n”;
Haha its a simple dalindrome test but still, its more than I have ever programmed before. And on top of it…. it works! Its in Perl.
Man, I am craving fatty foods and salt like no other. Its sad. This morning I had 4 egg whites and hash browns (no grease or salt mind you). Oh and the lack of ketchup! So for a snack I get chicken breast and a plum, for lunch a rice, beggie an d chicken mix. It all sounds good but its all flavourless! It needs gobs of salt and grease!
Its driving me insane!
Well at least in the long run I will hopefully be in better shape. I will be healthy for sure. Oh and I am getting my 300 GB hard drive hopefully tomorrow or the day after.