Hi, I am running PERL (v5.8.6) on a mac os x 10.4.11.I am a complete
newcomer to PERL
I was referring to the book
"PERL programming for the absolute beginner" by Jerry Lee Ford Jr.
I tried to run this code from the book (code is in green font)
#! /usr/bin/perl -w
#
# JokeMachine.pl
clear_the_screen();
$reply = " "
while ($reply ne 'yes') {
print 'Would you like to hear a joke? (yes/no): ' ;
chomp($reply = <STDIN>);
if($reply ne 'yes') {
print "\n Hum.......Perhaps you misunderstood \n\n";
}
}
clear_the_screen();
print "\n What disappears the moment you say it's name? \n\n";
chomp($reply = <STDIN>);
if (reply ne 'silence') {
print "\n Sorry. Wrong Answer\n";
} else {
print "\n Yes that is the right answer\n\n";
}
*and got the following error (Note: pe was on a line above rl JokeM.....)*
_______________________________________________
ActivePerl mailing list
[email protected]
To unsubscribe: http://listserv.ActiveState.com/mailman/mysubs