Date: Tue, 11 Nov 2003 14:57:04 -0600 From: "Darryl Hoar" <darryl@osborne-ind.com> To: <freebsd-questions@freebsd.org> Subject: OT - Perl Question Message-ID: <008001c3a896$5cda7f90$0701a8c0@darryl>
next in thread | raw e-mail | index | archive | help
I am trying to learn perl. I am going through a tutorial and have come
across a syntax error I can't figure out.
Here's the code:
print "Please tell me your name: ";
chop ($name=<STDIN>);
print "Please tell me your nationality: ";
chop ($nation=<STDIN>);
if ( $nation eq "British" or $nation eq "New Zealand" )
{
print "Hallo $name, pleased to meet you!\n";
}
when I try to run it, it generates a compile errors on the
if line.
I know its the conditional test, but don't know how to fix
it to be syntactically correct in perl.
Any help?
thanks,
-D
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?008001c3a896$5cda7f90$0701a8c0>
