Date: Tue, 11 Nov 2003 17:59:35 -0300 (ART) From: Fernando Gleiser <fgleiser@cactus.fi.uba.ar> To: Darryl Hoar <darryl@osborne-ind.com> Cc: freebsd-questions@freebsd.org Subject: Re: OT - Perl Question Message-ID: <20031111175621.K53796-100000@cactus.fi.uba.ar> In-Reply-To: <008001c3a896$5cda7f90$0701a8c0@darryl>
next in thread | previous in thread | raw e-mail | index | archive | help
On Tue, 11 Nov 2003, Darryl Hoar wrote: > > 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. Precedence errors, change it to: if ( ($nation eq "British") || ($nation eq "New Zealand") ) When in doubt, parentesize defensivelly :) Hope this helps. Fer > > Any help? > > thanks, > -D > _______________________________________________ > freebsd-questions@freebsd.org mailing list > http://lists.freebsd.org/mailman/listinfo/freebsd-questions > To unsubscribe, send any mail to "freebsd-questions-unsubscribe@freebsd.org" >
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?20031111175621.K53796-100000>