ASPN ActiveState Programmer Network
ActiveState
/ Home / Perl / PHP / Python / Tcl / XSLT /
/ Safari / My ASPN /
Cookbooks | Documentation | Mailing Lists | Modules | News Feeds | Products | User Groups


Recent Messages
List Archives
About the List
List Leaders
Subscription Options

View Subscriptions
Help

View by Topic
ActiveState
.NET Framework
Open Source
Perl
PHP
Python
Tcl
Web Services
XML & XSLT

View by Category
Database
General
SOAP
System Administration
Tools
User Interfaces
Web Programming
XML Programming


MyASPN >> Mail Archive >> activeperl
activeperl
syntax errors in perl
by Beegee Beegee other posts by this author
Aug 26 2009 10:00AM messages near this date
RE: Scrollbar on main window | Rewriting files
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.....)*

Privacy Policy | Email Opt-out | Feedback | Syndication
© ActiveState Software Inc. All rights reserved