RE: help needed with testing variable in an if statement

2002-01-21 Thread Thisell, Andrea
ready. if ($answer eq "N" or $answer eq "NO") { &fatal_error("Error message."); } -Andrea -Original Message- From: A Taylor [mailto:[EMAIL PROTECTED]] Sent: Monday, January 21, 2002 11:57 a To: [EMAIL PROTECTED] Subject: help needed with testing

Re: help needed with testing variable in an if statement

2002-01-21 Thread Vicky Lorenzo
Hi Anadi, Hope this helps: #!/tools/bin/perl -w print "enter a number\n"; $a = ; if ($a == 12 or $a== 8) {print "right\n";} else {print "incorrect\n";} #end of script -vicky --- A Taylor <[EMAIL PROTECTED]> wrote: > Hi all, > I am trying to test three variables in an 'if' > statement eg: >

help needed with testing variable in an if statement

2002-01-21 Thread A Taylor
Hi all, I am trying to test three variables in an 'if' statement eg: if ($a eq "abc and $b eq "efg" and $c eq "hi") { do some code . } how do i do this in perl Thanks in advance Anadi _ Send and receive Hotmail on your